Skip to content

Fix #7413: Adjust singleton arguments for new conversions #7566

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
Nov 18, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Nov 17, 2019

The types of old-style implicit conversion methods were massaged in adjustSingletonArgs to
become eligible for singleton arguments (which are widened, in order to get better cache hits
ratios). The same is now done for new style Conversion instances.

The types of old-style implicit conversion methods were massaged in `adjustSingletonArgs` to
become eligible for singleton arguments (which are widened, in order to get better cache hits
ratios). The same is now done for new style Conversion instances.
@odersky odersky requested a review from smarter November 17, 2019 18:06
}
case _ =>
tp.baseType(defn.ConversionClass) match
case app @ AppliedType(tycon, from :: to :: Nil) =>
Copy link
Member

@smarter smarter Nov 18, 2019

Choose a reason for hiding this comment

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

This could be:

Suggested change
case app @ AppliedType(tycon, from :: to :: Nil) =>
case app @ AppliedType(tycon, from :: rest) =>

Then rest can be reused below instead of to :: Nil.

@odersky odersky merged commit a252641 into scala:master Nov 18, 2019
@odersky odersky deleted the fix-#7413 branch November 18, 2019 11:52
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