Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 11969 - ICE(statement.c) When mixing in a string literal containing errors #3140

Merged
merged 1 commit into from Jan 22, 2014

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Jan 22, 2014

https://d.puremagic.com/issues/show_bug.cgi?id=11969

More error propagation on array elements and AssertExp

…ntaining errors

More error propagation on array elements and AssertExp
@@ -4480,8 +4491,10 @@ Expression *AssocArrayLiteralExp::semantic(Scope *sc)
return this;

// Run semantic() on each element
arrayExpressionSemantic(keys, sc);
arrayExpressionSemantic(values, sc);
bool err_keys = arrayExpressionSemantic(keys, sc);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do || here as well instead of introducing vars...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not good. If both keys and values have errors, using || would hide the errors in values.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I'm sure there are lots of places where we hide independent errors, unfortunately I don't know a way to automatically test for that.

@yebblies
Copy link
Member

Auto-merge toggled on

yebblies added a commit that referenced this pull request Jan 22, 2014
Issue 11969 - ICE(statement.c) When mixing in a string literal containing errors
@yebblies yebblies merged commit 66e2b13 into dlang:master Jan 22, 2014
@9rnsr 9rnsr deleted the fix11969 branch January 23, 2014 01:36
9rnsr pushed a commit to 9rnsr/dmd that referenced this pull request Feb 7, 2014
Issue 11969 - ICE(statement.c) When mixing in a string literal containing errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants