blob: 3f57bb33238f937c121f7fbf15a1eb5ada8ff8fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
//
// 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);
}
}
}
|