Skip to content

Fix #6210: Erase type blocks in Typed trees #6221

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 1 commit into from
Apr 5, 2019

Conversation

nicolasstucki
Copy link
Contributor

Type blocks of the for { type T1 = X1; ... ; type Tn = Xn; F[T1,..., Tn] }
are erased to F[X1,..., Xn]. We where erasing the type of the tree correctly but
needed to drop the block as well.

@nicolasstucki nicolasstucki marked this pull request as ready for review April 3, 2019 14:28
@nicolasstucki nicolasstucki requested a review from odersky April 3, 2019 14:28
val tpt1 = tpt match {
case Block(_, tpt) => tpt // erase type aliases (statements) from type block
case tpt => tpt
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problematic Typed.tpt is inserted in TypeTestsCasts.scala#L236, this case could also be handled there.

@nicolasstucki nicolasstucki changed the title Fix #6007: Erase type blocks in Typed trees Fix #6210: Erase type blocks in Typed trees Apr 3, 2019
Type blocks of the for `{ type T1 = X1; ... ; type Tn = Xn; F[T1,..., Tn] }`
are erased to `F[X1,..., Xn]`. We where erasing the type of the tree correctly but
needed to drop the block as well.
@odersky odersky merged commit 5ce597a into scala:master Apr 5, 2019
@ghost ghost removed the stat:needs review label Apr 5, 2019
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