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

Don't lose track of imports in presentation compiler #5987

Merged
merged 1 commit into from Sep 11, 2017

Conversation

retronym
Copy link
Member

@retronym retronym commented Jul 8, 2017

Fixes regression in that the reporter bisected to #4079.

I haven't reverted that change, but rather noticed that
the path through namers that enters trees that already
have symbols assigned was not extending the context chain
for imports.

Fixes scala/bug#9283

Fixes regression in that the reporter bisected to scala#4079.

I haven't reverted that change, but rather noticed that
the path through namers that enters trees that already
have symbols assigned was not extending the context chain
for imports.
@scala-jenkins scala-jenkins added this to the 2.12.4 milestone Jul 8, 2017
case sym => enterExistingSym(sym, tree)
case sym =>
tree match {
case tree@Import(_, _) => enterExistingSym(sym, tree).make(tree)
Copy link
Member

Choose a reason for hiding this comment

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

Why wasn't this leading to problems in the batch compiler?

Copy link
Member Author

@retronym retronym Jul 10, 2017

Choose a reason for hiding this comment

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

I think tree.symbol is null, at least for imports, at this point in the batch compiler, which goes to the code just above in dispatch().

case tree @ Import(_, _)                           => enterImport(tree); returnContext = context.make(tree)

I'll test that theory out by adding some assertions before I merge, won't have time for a few days though.

@retronym retronym merged commit cd18288 into scala:2.12.x Sep 11, 2017
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