Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

40 lines
614 B
C#

//
// Test case from bug 80518
//
using System;
namespace test
{
public class BaseClass
{
public BaseClass()
{
}
public string Hello { get { return "Hello"; } }
}
public abstract class Printer
{
public abstract void Print<T>(T obj) where T: BaseClass;
}
public class PrinterImpl : Printer
{
public override void Print<T>(T obj)
{
Console.WriteLine(obj.Hello);
}
}
public class Starter
{
public static void Main( string[] args )
{
BaseClass bc = new BaseClass();
Printer p = new PrinterImpl();
p.Print<BaseClass>(bc);
}
}
}