Skip to content

Fix #3273: Cook raw types #3285

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
Oct 8, 2017
Merged

Fix #3273: Cook raw types #3285

merged 2 commits into from
Oct 8, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 8, 2017

Replace Java raw types by existentials (wildcard applications).

Replace Java raw types by existentials (wildcard applications).
@odersky odersky requested a review from smarter October 8, 2017 08:59
@odersky odersky changed the title Cook raw types Fix #3273: Cook raw types Oct 8, 2017
/** Replace raw types with wildcard applications */
def cook(implicit ctx: Context) = new TypeMap {
def apply(tp: Type): Type = tp match {
case tp: TypeRef if tp.symbol.typeParams.nonEmpty =>
Copy link
Member

Choose a reason for hiding this comment

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

Micro-optimization: prefer !isEmpty, nonEmpty is a trait method

@odersky odersky merged commit 28cfb1a into scala:master Oct 8, 2017
@allanrenucci allanrenucci deleted the fix-#3273 branch December 14, 2017 19:18
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