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 11982 - ICE(func.c) With function literal with no body #3148

Merged
merged 1 commit into from Jan 25, 2014

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Jan 25, 2014

nextToken();
else if (literal)
error("missing { ... }");
if (!literal)
Copy link
Member

Choose a reason for hiding this comment

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

Replace if (!literal) with else

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. Because the semicolon token after the function literal should not be consumed always.

@WalterBright
Copy link
Member

missing test case

@9rnsr
Copy link
Contributor Author

9rnsr commented Jan 25, 2014

Updated to fix reviewed points.

@yebblies
Copy link
Member

Auto-merge toggled on

yebblies added a commit that referenced this pull request Jan 25, 2014
Issue 11982 - ICE(func.c) With function literal with no body
@yebblies yebblies merged commit 815d5bc into dlang:master Jan 25, 2014
@yebblies
Copy link
Member

@AndrewEdwards I would recommend this for the release branch, as it is an ICE and fairly non-intrusive patch.

@AndrewEdwards
Copy link
Contributor

This has been picked because the release is delayed because of issues encountered while building the Windows binaries.

@9rnsr 9rnsr deleted the fix11982 branch January 25, 2014 15:53
yebblies added a commit that referenced this pull request Jan 28, 2014
Issue 11982 - ICE(func.c) With function literal with no body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants