Merge pull request #15293 from lewing/wasm-clean
[mono-project.git] / mcs / tests / test-partial-03.cs
blobf4b77c75fe48d5a1888a13dfb01db6950ce74be4
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 public 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;