Permalink
Browse files

Add a test.

svn path=/trunk/mono/; revision=156053
  • Loading branch information...
1 parent 6f4aa68 commit 513a4ef69337b7dd08cd4cb3442f6eb5ecf2cba4 @vargaz vargaz committed Apr 24, 2010
Showing with 37 additions and 1 deletion.
  1. +2 −1 mono/tests/Makefile.am
  2. +35 −0 mono/tests/bug-599469.cs
@@ -365,7 +365,8 @@ BASE_TEST_CS_SRC= \
large-gc-bitmap.cs \
bug-561239.cs \
bug-562150.cs \
- bug-575941.cs
+ bug-575941.cs \
+ bug-599469.cs
TEST_CS_SRC_DIST= \
$(BASE_TEST_CS_SRC) \
@@ -0,0 +1,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();
+ }
+}

0 comments on commit 513a4ef

Please sign in to comment.