Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

70 lines
907 B
C#

//
// This test checks if we implement all the interfaces inherited
//
interface IA {
void A ();
}
interface IB : IA {
void B ();
}
interface IC : IA, IB {
void C ();
}
interface ID : IC {
}
class AA : IC {
bool a, b, c;
public void A () { a = true; }
public void B () { b = true; }
public void C () { c = true; }
public bool OK {
get {
return a && b && c;
}
}
}
class BB : ID{
bool a, b, c;
public void A () { a = true; System.Console.WriteLine ("A"); }
public void B () { b = true; }
public void C () { c = true; }
public bool OK {
get {
return a && b && c;
}
}
}
class T: IB {
public void A () {}
public void B () {}
public static int Main() {
BB bb = new BB ();
bb.A ();
bb.B ();
bb.C ();
if (!bb.OK)
return 1;
AA aa = new AA ();
aa.A ();
aa.B ();
aa.C ();
if (!aa.OK)
return 2;
return 0;
}
}