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

fix Issue 21614 - AssertError@src/dmd/semantic3.d(812): Assertion failure #12191

Merged
merged 1 commit into from Feb 11, 2021

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Feb 9, 2021

Template instances may import modules that have not finished semantic1, and in the case of cyclic imports, semantic2 could be ran on a function symbol before semantic1 has begun, which can lead to auto functions given the wrong return type.

@ibuclaw ibuclaw added the Bug Fix label Feb 9, 2021
@dlang-bot
Copy link
Contributor

dlang-bot commented Feb 9, 2021

Thanks for your pull request, @ibuclaw!

Bugzilla references

Auto-close Bugzilla Severity Description
21614 major compiled imports: core.exception.AssertError@src/dmd/semantic3.d(812): Assertion failure

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + dmd#12191"

@kinke
Copy link
Contributor

kinke commented Feb 9, 2021

Sounds definitely worth targeting stable to have it in 2.095.1.

@RazvanN7
Copy link
Contributor

Yes, please target stable.

…lure

Template instances may import modules that have not finished semantic1,
and in the case of cyclic imports, semantic2 could be ran on a function
symbol before semantic1 has begun, which can lead to auto functions
given the wrong return type.
@ibuclaw
Copy link
Member Author

ibuclaw commented Feb 11, 2021

Rebased, though having it in master would allow it to be a bit more readily tested.

@RazvanN7
Copy link
Contributor

The code added is harmless and fixes an ICE, so I see no reason why we should be extra cautious.

@RazvanN7 RazvanN7 closed this Feb 11, 2021
@RazvanN7 RazvanN7 reopened this Feb 11, 2021
@dlang-bot dlang-bot merged commit 599c1b3 into dlang:stable Feb 11, 2021
@ibuclaw ibuclaw deleted the issue21614 branch February 11, 2021 17:05
@ibuclaw
Copy link
Member Author

ibuclaw commented Feb 11, 2021

The code added is harmless and fixes an ICE, so I see no reason why we should be extra cautious.

Changing the order that semantic runs in is never harmless IMO, especially considering bugs such as issue 20753 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants