In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
[mcs.git] / tests / test-partial-03.cs
blobfa4eb1be1f18fa546e68540d6778b70c1a85bccc
1 // Compiler options: -langversion:default
3 public partial class Test
5 public readonly Foo TheFoo;
7 public Test ()
9 this.TheFoo = new Foo ();
12 public partial interface IFoo
14 int Hello (Test foo);
17 public int TestFoo ()
19 return TheFoo.Hello (this);
23 public partial class Test
25 public partial class Foo : IFoo
27 int IFoo.Hello (Test test)
29 return 2;
32 public int Hello (Test test)
34 return 1;
38 public int TestIFoo (IFoo foo)
40 return foo.Hello (this);
44 class X
46 static int Main ()
48 Test test = new Test ();
49 if (test.TestFoo () != 1)
50 return 1;
51 if (test.TestIFoo (test.TheFoo) != 2)
52 return 2;
53 return 0;