Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Issue 9291 - ICE on throwing undefined identifier #1461

Merged
merged 1 commit into from

1 participant

@9rnsr
Collaborator

LGTM.

@9rnsr 9rnsr merged commit 1eb2bf2 into D-Programming-Language:master
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost 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
Commits on Jan 10, 2013
  1. Fixes Issue 9291 - ICE on throwing undefined identifier.

    Andrej Mitrovic authored
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 2 deletions.
  1. +3 −2 src/statement.c
  2. +11 −0 test/fail_compilation/ice9291.d
View
5 src/statement.c
@@ -5005,9 +5005,10 @@ Statement *ThrowStatement::semantic(Scope *sc)
int ThrowStatement::blockExit(bool mustNotThrow)
{
- if (mustNotThrow)
+ Type *t = exp->type->toBasetype();
+ if (mustNotThrow && t->ty != Terror)
{
- ClassDeclaration *cd = exp->type->toBasetype()->isClassHandle();
+ ClassDeclaration *cd = t->isClassHandle();
assert(cd);
// Bugzilla 8675
View
11 test/fail_compilation/ice9291.d
@@ -0,0 +1,11 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice9291.d(10): Error: undefined identifier F
+---
+*/
+
+void main() nothrow
+{
+ throw new F();
+}
Something went wrong with that request. Please try again.