Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / generic-sealed-virtual.2.cs
1 using System;
2
3 public abstract class Elem {
4     public abstract Type getType<T> ();
5 }
6
7 public sealed class TextElem : Elem {
8     public override Type getType<T> () { return typeof (T); }
9 }
10
11 public class OtherTextElem : Elem {
12     public sealed override Type getType<T> () { return typeof (T); }
13 }
14
15 public class main {
16     public static int Main () {
17         TextElem elem = new TextElem ();
18
19         if (elem.getType<string> () != typeof (string))
20             return 1;
21
22         OtherTextElem oelem = new OtherTextElem ();
23
24         if (oelem.getType<string> () != typeof (string))
25             return 1;
26
27         return 0;
28     }
29 }