[corlib] Fix a few NSLogWriter issues. (#13799)
[mono-project.git] / mcs / tests / test-346.cs
blobe974e6dec7ae941ad93d1d8daadf58bda1d2ab98
1 using System;
3 namespace TestMethods
5 class Class1
7 public 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;