Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Issue 8742 - ICE on anon class derived from nested class. #1466

Merged
merged 1 commit into from

2 participants

Andrej Mitrović Walter Bright
Walter Bright WalterBright merged commit c55d4ef into from
Walter Bright WalterBright referenced this pull request from a commit
Walter Bright WalterBright merge D2 pull #1466 11e8536
Deleted user Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Deleted user Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Deleted user Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Deleted user Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 1 deletion.
  1. +1 −1  src/mtype.c
  2. +11 −0 test/fail_compilation/ice8742.d
2  src/mtype.c
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;
11 test/fail_compilation/ice8742.d
View
@@ -0,0 +1,11 @@
+// PERMUTE_ARGS:
+class C
+{
+ class D { }
+}
+
+void main ( )
+{
+ auto c = new C;
+ auto d = c.new class C.D { };
+}
Something went wrong with that request. Please try again.