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

test-804.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 20483e4e7b71b7477308ed518e6c2d5358b79926 (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
40
41
42
43
using System;

interface IA
{
	int Foo { get; }
}

interface IB_1 : IA
{
	new string Foo { get; }
}

interface IB_2 : IA
{
	new char Foo { get; }
}

interface IC : IB_2, IB_1
{
	new byte Foo { get; }
}

class A : IA
{
	public int Foo { get { return 3; } }
}

class B : A, IB_1
{
	public new string Foo { get { return "1"; } }
}

class C : B, IC
{
	char IB_2.Foo { get { return 'a'; } }
	
	public new byte Foo { get { return 2; } }
	
	public static void Main ()
	{
		new C ();
	}
}