Permalink
Browse files

Fixes Issue 8742 - ICE on anon class derived from nested class.

  • Loading branch information...
1 parent bc8b981 commit 2e20e68eae3473b514d7cfa0275afa704c6990df @AndrejMitrovic AndrejMitrovic committed Jan 10, 2013
Showing with 12 additions and 1 deletion.
  1. +1 −1 src/mtype.c
  2. +11 −0 test/fail_compilation/ice8742.d
View
@@ -8802,7 +8802,7 @@ int TypeClass::isscope()
int TypeClass::isBaseOf(Type *t, int *poffset)
{
- if (t->ty == Tclass)
+ if (t && t->ty == Tclass)
{ ClassDeclaration *cd;
cd = ((TypeClass *)t)->sym;
@@ -0,0 +1,11 @@
+// PERMUTE_ARGS:
+class C
+{
+ class D { }
+}
+
+void main ( )
+{
+ auto c = new C;
+ auto d = c.new class C.D { };
+}

0 comments on commit 2e20e68

Please sign in to comment.