Skip to content

Fix #2246: Ensure ScalaTest compiles again #2258

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

Closed
wants to merge 4 commits into from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 13, 2017

Several problems. The first had to do with name mangling. The second concerned handling of symbols in super calls, augmenting #2216. Finally, the third problem concerned interaction between
symbols in super calls and outer accessor generation.

@odersky odersky requested a review from smarter April 13, 2017 12:56
@@ -338,7 +337,9 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform

private def newName(sym: Symbol)(implicit ctx: Context): Name =
if (sym.isAnonymousFunction && sym.owner.is(Method, butNot = Label))
(sym.name ++ NJ ++ sym.owner.name).freshened
sym.name.rewrite {
case name: SimpleTermName => ExpandPrefixName(sym.owner.name.asTermName, name)
Copy link
Member

Choose a reason for hiding this comment

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

It's kind of weird to use ExpandPrefixName here since this isn't a prefix, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but FlatName does not fit either.

@odersky odersky changed the title Fix #2246: Use semantic names when freshening Fix #2246: Ensure ScalaTest compiles again Apr 13, 2017
@odersky
Copy link
Contributor Author

odersky commented Apr 14, 2017

Superseded by #2263.

@odersky odersky closed this Apr 14, 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
Development

Successfully merging this pull request may close these issues.

2 participants