diff options
Diffstat (limited to 'linker/Tests/Mono.Linker.Tests.Cases/Interop/PInvoke/UnusedDefaultConstructorIsRemoved.cs')
-rw-r--r-- | linker/Tests/Mono.Linker.Tests.Cases/Interop/PInvoke/UnusedDefaultConstructorIsRemoved.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/linker/Tests/Mono.Linker.Tests.Cases/Interop/PInvoke/UnusedDefaultConstructorIsRemoved.cs b/linker/Tests/Mono.Linker.Tests.Cases/Interop/PInvoke/UnusedDefaultConstructorIsRemoved.cs new file mode 100644 index 000000000..041cc9c98 --- /dev/null +++ b/linker/Tests/Mono.Linker.Tests.Cases/Interop/PInvoke/UnusedDefaultConstructorIsRemoved.cs @@ -0,0 +1,27 @@ +using System.Runtime.InteropServices; +using Mono.Linker.Tests.Cases.Expectations.Assertions; + +namespace Mono.Linker.Tests.Cases.Interop.PInvoke { + class UnusedDefaultConstructorIsRemoved { + public static void Main () + { + var a = new A (1); + SomeMethod (a); + } + + class A { + public A () + { + } + + [Kept] + public A (int other) + { + } + } + + [Kept] + [DllImport ("Unused")] + private static extern void SomeMethod (A a); + } +}
\ No newline at end of file |