Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / test-717.cs
1 using System;
2
3 class AA
4 {
5         public virtual int Foo (int i)
6         {
7                 return 1;
8         }
9 }
10
11 abstract class A : AA
12 {
13         public int Foo (byte b)
14         {
15                 return 2;
16         }
17         
18         public override int Foo (int i)
19         {
20                 return 4;
21         }
22 }
23
24 sealed class B : A
25 {
26         public override int Foo (int i)
27         {
28                 return 3;
29         }
30         
31         public void Foo (string s)
32         {
33         }
34 }
35
36 struct S
37 {
38         public override string ToString ()
39         {
40                 return "aaaa";
41         }
42 }
43
44 class MyClass
45 {
46         public static int Main ()
47         {
48                 S s = new S ();
49                 string sss = "a" + s.ToString ();
50                 
51                 B b = new B ();
52                 int res = b.Foo (1);
53                 
54                 if (res != 2)
55                         return res;
56                 
57                 Console.WriteLine ("OK");
58                 return 0;
59         }
60 }