blob: d4f3c37790c826ec5601c85ddb0fc748790e268d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using System.Runtime.CompilerServices;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
namespace Mono.Linker.Tests.Cases.Interop.InternalCalls {
class UnusedFieldsOfTypesPassedByRefAreNotRemoved {
public static void Main ()
{
var a = new A ();
SomeMethod (ref a);
}
[KeptMember (".ctor()")]
class A {
[Kept] private int field1;
[Kept] private int field2;
}
[Kept]
[MethodImpl (MethodImplOptions.InternalCall)]
static extern void SomeMethod (ref A a);
}
}
|