Welcome to mirror list, hosted at ThFree Co, Russian Federation.

UnusedDefaultConstructorOfTypePassedByRefIsNotRemoved.cs « InternalCalls « Interop « Mono.Linker.Tests.Cases « Tests « linker - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d181ecd0a39820a94fa3e606ba4fe01718e20ddb (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
using System.Runtime.CompilerServices;
using Mono.Linker.Tests.Cases.Expectations.Assertions;

namespace Mono.Linker.Tests.Cases.Interop.InternalCalls {
	class UnusedDefaultConstructorOfTypePassedByRefIsNotRemoved {
		public static void Main ()
		{
			var a = new A (1);
			SomeMethod (ref a);
		}

		class A {
			[Kept]
			public A ()
			{
			}

			[Kept]
			public A (int other)
			{
			}
		}

		[Kept]
		[MethodImpl (MethodImplOptions.InternalCall)]
		static extern void SomeMethod (ref A a);
	}
}