blob: 1c4e60666d45b1c6e70a275345bb80a858a993c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
using System;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed
{
[SetupLinkerArgument ("--used-attrs-only", "true")]
class UsedAttributeTypeOnParameterIsKept
{
static void Main ()
{
new Bar ().Method ("Hello");
var str = typeof (FooAttribute).ToString ();
}
[Kept]
[KeptMember (".ctor()")]
class Bar
{
[Kept]
public void Method ([Foo] [KeptAttributeAttribute (typeof (FooAttribute))] string arg)
{
}
}
[Kept]
[KeptMember (".ctor()")]
[KeptBaseType (typeof (Attribute))]
class FooAttribute : Attribute
{
}
}
}
|