Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-316.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ca1f8faa1d35e207026fcc1f7c09c53049a869d5 (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
// Bug #79984
using System;

class X
{
	static void Main ()
	{ }
}

class Foo
{
	public int X;
}
	
abstract class Base
{
	public abstract void Method<R> ()
		where R : Foo, new ();
}
	
class Derived : Base
{
	public override void Method<S> ()
	{
		Method2<S> ();
		// S s = new S ();
		// Console.WriteLine (s.X);
	}

	public void Method2<T> ()
		where T : Foo, new ()
	{
		T t = new T ();
		Console.WriteLine (t.X);
	}
}