Skip to content

[backport] Fix TyperState assertion failures #12837

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

Conversation

smarter
Copy link
Member

@smarter smarter commented Jun 15, 2021

This backports #12827.

smarter added 2 commits June 15, 2021 18:55
The TyperState of `FunProto#protoCtx` might already be committed by the
time we call `FunProto#typedArgs` (this can happen for example with
the nested TyperState in a `tryEither`), in that case we can trigger
assertion errors if we touch that TyperState again. Fixed by using the
nearest uncommited ancestor of the capture TyperState instead.
Flushing the reporter can force messages (apparently because of
`HideNonSensicalMessages#isHidden`) which can affect the TyperState
we're in the process of committing, so make sure that flushing happens
before committing to not trigger any assertion.

Fixes scala#12736
@smarter smarter added this to the 3.0.1 milestone Jun 15, 2021
@smarter smarter requested a review from odersky June 15, 2021 18:34
@smarter smarter merged commit 13942b0 into scala:release-3.0.1 Jun 16, 2021
@smarter smarter deleted the backport-skip-already-committed branch June 16, 2021 09:24
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