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