Skip to content

Fix #2232: Don't check AndTypes in liftToClasses #2329

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 4 commits into from
Apr 29, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 28, 2017

The purpose of liftToClasses is just to aggregate two
types into one. No attempt at checking well-formedness
is necessary.

odersky added 2 commits April 28, 2017 18:13
The purpose of liftToClasses is just to aggregate two
types into one. No attempt at checking well-formedness
is necessary.
@odersky odersky requested a review from liufengyun April 28, 2017 16:37
/** Make an AndType using `op` unless clearly unnecessary (i.e. without
* going through `&`).
*/
def make(tp1: Type, tp2: Type, op: (Type, Type) => AndType)(implicit ctx: Context): Type =
Copy link
Member

Choose a reason for hiding this comment

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

Is a lambda really necessary here? I would have gone with a checkWellFormedness: Boolean = true parameter instead, creating closures in derivedAndType seems wasteful.

odersky added 2 commits April 29, 2017 11:07
Use a boolean instead of a lambda for efficiency.
@odersky odersky merged commit 10a2ce6 into scala:master Apr 29, 2017
@allanrenucci allanrenucci deleted the fix-#2232 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