Skip to content
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

newsubtype #14

Merged
merged 3 commits into from
Mar 29, 2018
Merged

newsubtype #14

merged 3 commits into from
Mar 29, 2018

Conversation

carymrobbins
Copy link
Member

No description provided.

Copy link
Contributor

@joroKr21 joroKr21 left a comment

Choose a reason for hiding this comment

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

Awesome, I didn't think you would implement this so quickly 👍

case (Nil, false) => q"type Type <: Base with Tag"
case (tparams, false) => q"type Type[..$tparams] <: Base with Tag[..$tparamsNames]"
case (Nil, true) => q"type Type = Base with Tag"
case (tparams, true) => q"type Type[..$tparams] = Base[..$tparamsNames] with Tag[..$tparamsNames]"
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this lead to problems with type inference again? What do we gain from using = instead of <:?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this was the result of me thinking that the abstract type was causing boxing, but later I realized boxing was happening for a different reason (which you commented on as well -
scala/bug#10770).

Just added a commit to fix this and all looks good, nice catch!

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