Merge pull request #15293 from lewing/wasm-clean
[mono-project.git] / mcs / tests / test-166.cs
blob083dca8453984b7d9e2c3f4d90596525324ceff7
1 using System;
3 interface ITargetInfo
5 int TargetIntegerSize {
6 get;
10 interface ITargetMemoryAccess : ITargetInfo
14 interface IInferior : ITargetMemoryAccess
18 interface ITest
20 int this [int index] {
21 get;
25 class Test : ITest
27 public int this [int index] {
28 get { return 5; }
31 int ITest.this [int index] {
32 get { return 8; }
36 class D : IInferior
38 public int TargetIntegerSize {
39 get { return 5; }
42 int Hello (IInferior inferior)
44 return inferior.TargetIntegerSize;
47 public static int Main ()
49 D d = new D ();
51 if (d.Hello (d) != 5)
52 return 1;
54 Test test = new Test ();
55 ITest itest = test;
57 if (test [0] != 5)
58 return 2;
59 if (itest [0] != 8)
60 return 3;
62 return 0;