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

PreserveSecondLevelMethodsOfNonRequiredType.cs « LinkXml « Mono.Linker.Tests.Cases « test - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4896c2a142092d8ed7348233678dfaac09717b4a (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
29
30
31
32
33
34
35
36
37
38
39
using System.Collections.Generic;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;

namespace Mono.Linker.Tests.Cases.LinkXml
{
	[SetupLinkerDescriptorFile ("PreserveSecondLevelMethodsOfNonRequiredType.xml")]
	class PreserveSecondLevelMethodsOfNonRequiredType
	{
		public static void Main ()
		{
			new Unused ();
		}

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

			[Kept]
			private void PreservedMethod ()
			{
				new SecondLevel (2);
			}
		}

		[Kept]
		class SecondLevel
		{
			[Kept]
			public SecondLevel (int arg)
			{
			}
		}
	}
}