summaryrefslogtreecommitdiff
path: root/mcs/tests/gtest-494.cs
blob: 4f8c4aea5c149e83b289f0f4eda8307f48176559 (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
public class Grid<CT>
		where CT : Grid<CT>.GPD.GC, new ()
{
	public abstract class GPD
	{
		public GPD ()
		{
			ctInst = new CT ();
		}

		public readonly CT ctInst;

		public abstract class GC
		{
		}
	}
}

public class H : Grid<H.MyCT>.GPD
{
	public class MyCT : GC
	{
		// When no explicit default constructor is present GMCS fails to compile the file.
		// When it is present the execution crashes on mono.
		//      public MyCT () {}
	}
}

public class TheTest
{
	public static void Main (string[] args)
	{
		new H ();
	}
}