Skip to content

Fix #1771: Harden namer in the presence of double definitions #3922

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

Merged
merged 2 commits into from
Jan 26, 2018

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jan 26, 2018

i1771.scala exhibits a case where an inner class is a double definition of a type parameter.
The inner class then gets renamed, but this caused problems for the generation of companion
links.

Companion links are fixed in Namer. There is also a change in Typer, where a missing
OriginalSymbol caused a crash. It turned out this was caused by the companion link generation
so once the latter was fixed, the crash did not happen anymore. Nevertheless I feel it's more
prudent to turn the crash into a "this should not happen" error, because we might have overlooked
other error paths that also lead to missing OriginalSymbols.

i1771.scala exhibits a case where an inner class is a double definition of a type parameter.
The inner class then gets renamed, but this caused problems for the generation of companion
links.

Companion links are fixed in Namer. There is also a change in Typer, where a missing
OriginalSymbol caused a crash. It turned out this was caused by the companion link generation
so once the latter was fixed, the crash did not happen anymore. Nevertheless I feel it's more
prudent to turn the crash into a "this should not happen" error, because we might have overlooked
other error paths that also lead to missing OriginalSymbols.
@odersky odersky merged commit b58799e into scala:master Jan 26, 2018
@allanrenucci allanrenucci deleted the fix-#1771 branch January 26, 2018 16:29
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.

2 participants