Skip to content

Fix #9309: Don't set TypeErrors on trees that are desugared later #9318

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
Jul 9, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jul 8, 2020

When setting the type of a tree to a type error, we have to make sure the
tree is not before desugaring. First, it does not make sense to add a type
to a tree that exists only in untyped form. Second, this might miss adding
a type to the desugared tree that needs one.

This is achieved by splitting the catch-all for TypeErrors between typedUnadapted
and adapt.

When setting the type of a tree to a type error, we have to make sure the
tree is not before desugaring. First, it does not make sense to add a type
to a tree that exists only in untyped form. Second, this might miss adding
a type to the desugared tree that needs one.

This is achieved by splitting the catch-all for TypeErrors between typedUnadapted
and adapt.
@nicolasstucki nicolasstucki linked an issue Jul 8, 2020 that may be closed by this pull request
@odersky odersky requested a review from nicolasstucki July 8, 2020 15:55
@odersky odersky added the fasttrack Simple fix. Reviewer should merge or apply additional changes directly. label Jul 8, 2020
@nicolasstucki nicolasstucki merged commit 47025d4 into scala:master Jul 9, 2020
@nicolasstucki nicolasstucki deleted the fix-#9309 branch July 9, 2020 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fasttrack Simple fix. Reviewer should merge or apply additional changes directly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline recursive definition causes an assertion error
2 participants