blob: 834c446ac4da92da3143a8f0c71c779c05b1262b (
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
|
using System;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
namespace Mono.Linker.Tests.Cases.Attributes {
class AttributeOnUsedFieldIsKept {
public static void Main ()
{
var val = new A ().field;
}
[KeptMember (".ctor()")]
class A {
[Kept]
[KeptAttributeAttribute (typeof (FooAttribute))]
[Foo]
public int field;
}
[Kept]
[KeptMember(".ctor()")]
[KeptBaseType (typeof (System.Attribute))]
class FooAttribute : Attribute {
}
}
}
|