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

ReturnValueDowncastedToInterface.cs « NoKeptCtorButInterfaceNeeded « OnReferenceType « Inheritance.Interfaces « Mono.Linker.Tests.Cases « Tests « linker - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0aef967a52039721cf86bf8963cf2690b476b863 (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
using Mono.Linker.Tests.Cases.Expectations.Assertions;

namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoKeptCtorButInterfaceNeeded {
	public class ReturnValueDowncastedToInterface {
		public static void Main ()
		{
			UseAnIFoo (GetAFoo ());
		}

		[Kept]
		static Foo GetAFoo ()
		{
			return null;
		}

		[Kept]
		static void UseAnIFoo (IFoo arg)
		{
		}

		[Kept]
		[KeptInterface (typeof (IFoo))]
		class Foo : IFoo {
		}

		[Kept]
		interface IFoo {
		}
	}
}