cosmetic
[mcs.git] / tests / test-346.cs
blobdf36d1bd40f6f10ca3babd964ab6f442cc367a3f
1 using System;
3 namespace TestMethods
5 class Class1
7 static int Main()
9 int test_int = 1;
10 TestClass testClass = new TestClass();
11 test_int *= testClass.AddItem (new TestParam());
12 test_int *= testClass.AddItem (new ParamClass());
14 int base_int = 1;
15 BaseClass baseClass = testClass as BaseClass;
16 base_int *= baseClass.AddItem (new TestParam());
17 base_int *= baseClass.AddItem (new ParamClass());
19 return (test_int == 4 && base_int == 9) ? 0 : 1;
23 public class ParamClass {}
25 public class TestParam : ParamClass {}
27 public abstract class BaseClass
29 public abstract int AddItem (ParamClass val);
32 public class TestClass : BaseClass
34 public int AddItem (object val)
36 return 2;
39 public override int AddItem (ParamClass val)
41 return 3;