Skip to content

fix #3645: handle type alias in child instantiation #3646

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 10 commits into from
Jan 18, 2018

Conversation

liufengyun
Copy link
Contributor

Fix #3645: handle type alias in child instantiation

@smarter
Copy link
Member

smarter commented Dec 10, 2017

I think this code would benefit from having more comments explaining what it does :).

case tp @ ThisType(tref) if !tref.symbol.isStaticOwner =>
if (tref.symbol.is(Module)) mapOver(tref)
else newTypeVar(TypeBounds.upper(tp.underlying))
case tp: TypeRef if tp.underlying.isInstanceOf[TypeBounds] =>
// Note that the logic for contra- and co-variance is reverse of `typeParamMap`
Copy link
Member

@smarter smarter Dec 11, 2017

Choose a reason for hiding this comment

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

typeParamMap was renamed parentTypeMap :)

Copy link
Contributor

@OlivierBlanvillain OlivierBlanvillain left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

4 participants