Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 2e20e68eae3473b514d7cfa0275afa704c6990df 1 parent bc8b981
@drey08 drey08 authored
Showing with 12 additions and 1 deletion.
  1. +1 −1  src/mtype.c
  2. +11 −0 test/fail_compilation/ice8742.d
View
2  src/mtype.c
@@ -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;
View
11 test/fail_compilation/ice8742.d
@@ -0,0 +1,11 @@
+// PERMUTE_ARGS:
+class C
+{
+ class D { }
+}
+
+void main ( )
+{
+ auto c = new C;
+ auto d = c.new class C.D { };
+}
Please sign in to comment.
Something went wrong with that request. Please try again.