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

Remove global.gag check in DsymbolExp.resolve() #5135

Merged
merged 1 commit into from
Sep 29, 2015

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Sep 28, 2015

Separated from #4731.

When an instance that will be converted to a constant exists, the instance representation "foo!tiargs" is treated like a variable name, and its recursive appearance check (note that it's equivalent with a recursive instantiation of foo) is done separately from the circular initialization check for the eponymous enum variable declaration.

By the approach, we can remove problematic global.gag check in DsymbolExp::semantic() without breaking fail_compilation/diag10141.d.

When an instance that will be converted to a constant exists,
the instance representation "foo!tiargs" is treated like a
variable name, and its recursive appearance check (note that
it's equivalent with a recursive instantiation of foo) is done
separately from the circular initialization check for the
eponymous enum variable declaration.

By the approach, we can remove problematic `global.gag` check in
`DsymbolExp::semantic()` without breaking `fail_compilation/diag10141.d`.
@9rnsr
Copy link
Contributor Author

9rnsr commented Sep 28, 2015

@WalterBright @yebblies This is a long-standing bug in the front-end code. Please fix!


if (!v.type)
{
error("forward reference of %s %s", v.kind(), v.toChars());
Copy link
Member

Choose a reason for hiding this comment

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

I know it can be hard to trigger this and the following two error messages, but can a test suite entry be done for them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line error is already tested in fail88.d. And following error recursive expansion will be tested in #4731.

@WalterBright
Copy link
Member

Auto-merge toggled on

@9rnsr
Copy link
Contributor Author

9rnsr commented Sep 29, 2015

thanks!

WalterBright added a commit that referenced this pull request Sep 29, 2015
Remove global.gag check in DsymbolExp.resolve()
@WalterBright WalterBright merged commit 6a062c6 into dlang:master Sep 29, 2015
@9rnsr 9rnsr deleted the remove_gagcheck branch September 29, 2015 08:35
@JinShil
Copy link
Contributor

JinShil commented Aug 31, 2018

According to digger, this PR introduced a regression: https://issues.dlang.org/show_bug.cgi?id=19202

@ibuclaw ibuclaw self-assigned this Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants