2010-06-17 Geoff Norton <gnorton@novell.com>
[mono.git] / mono / tests / generic-sealed-virtual.2.cs
blobdc3b6ec9deafd45f5f103d1c82c35a7e1ef6e803
1 using System;
3 public abstract class Elem {
4 public abstract Type getType<T> ();
7 public sealed class TextElem : Elem {
8 public override Type getType<T> () { return typeof (T); }
11 public class OtherTextElem : Elem {
12 public sealed override Type getType<T> () { return typeof (T); }
15 public class main {
16 public static int Main () {
17 TextElem elem = new TextElem ();
19 if (elem.getType<string> () != typeof (string))
20 return 1;
22 OtherTextElem oelem = new OtherTextElem ();
24 if (oelem.getType<string> () != typeof (string))
25 return 1;
27 return 0;