[interp] Remove unreachable code (#12411)
[mono-project.git] / mono / tests / bug-77127.cs
blobf506927d3abe842c5b3914f332645b7295030d4e
1 using System;
3 public interface IX {}
4 public interface IY : IX {}
6 public class X : IX {
7 public override string ToString () {
8 return "X";
12 public class Y : IY {
13 public override string ToString () {
14 return "Y";
18 public interface IA {
19 IX Prop { get; }
22 public interface IB : IA {
23 new IY Prop { get; }
26 public interface IC : IB {
29 public class A : IA {
31 IX IA.Prop {
32 get { return new X (); }
36 public class B : A, IA, IB {
37 IX IA.Prop {
38 get { return new Y (); }
41 IY IB.Prop {
42 get { return new Y (); }
46 public class C : B, IC {
49 class MainClass {
50 static int Main(string[] args) {
51 IC c = new C ();
52 IX w = ((IA)c).Prop;
53 if (w.ToString () == "Y") {
54 return 0;
55 } else {
56 return 1;
58 Console.WriteLine (w.ToString ());