[configure] Add new target.
[mono-project.git] / mcs / tests / test-316.cs
blob9294a043b7809349e65fd2ac9a3a02c072f0f4ae
1 using System;
3 interface IA
5 int Add(int i);
8 interface IB
10 int Add(int i);
13 interface IC : IA, IB {}
15 interface IE : ICloneable, IDisposable {
16 void doom ();
19 class D : IC, IB
21 int IA.Add (int i) {
22 return 5;
25 int IB.Add (int i) {
26 return 6;
30 class E: IE, IC {
31 public E() {
33 public void doom () {
34 return;
36 public Object Clone () {
37 return null;
39 public void Dispose () {}
40 int IA.Add (int i) {
41 return 7;
44 int IB.Add (int i) {
45 return 8;
49 class C
51 static int Test(IC n) {
52 IA a = (IA) n;
53 if (a.Add(0) != 5)
54 return 1;
56 if (((IA)n).Add(0) != 5)
57 return 1;
59 if (((IB)n).Add(0) != 6)
60 return 1;
63 return 0;
66 static void Test2(IE ie) {
67 ie.doom ();
68 ie.Clone();
69 ie.Dispose ();
72 public static int Main()
74 D d = new D();
75 E e = new E();
76 Test (e);
77 Test2 (e);
79 return Test (d);