GenericParameter.cs: override Module properly
[mcs.git] / tests / test-87.cs
blobaaa809f8bc4b153bed2ab7a5640c617d227189f8
1 //
2 // Tests the lookup of names on nested classes.
3 //
4 // Tests nested interfaces
5 //
6 class Top {
8 class X {
12 class Y : X {
15 interface A {
16 int get_one ();
19 interface B : A {
20 int get_two ();
23 public class XA : A {
24 public int get_one () { return 1; }
27 class XB : B {
28 public int get_one () { return 1; }
29 public int get_two () { return 2; }
32 static int Main ()
34 XA x = new XA ();
36 if (x.get_one () != 1)
37 return 1;
39 XB b = new XB ();
40 if (x.get_one () != 1)
41 return 2;
42 if (b.get_two () != 2)
43 return 3;
45 XB [] xb = null;
47 return 0;
52 // The following tests that the compiler will actually properly
53 // find the types that are requested (they are nested types)
55 class Other {
56 public void X ()
58 Top.XA xa = null;
59 Top.XA [] xb = null;