Skip to content

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 4, 2022

A difference between Typer and TreeUnpickler is that Typer performs
a simplification step after type assigning a tree mode and unpickler
doesn't. This makes a difference for lubs in unsafeNulls mode.

We fix this by also doing simplification in Unpickler for trees
that can have types resulting from lubs.

odersky added 2 commits May 4, 2022 19:07
A difference between Typer and TreeUnpickler is that Typer performs
a simplification step after type assigning a tree mode and unpickler
doesn't. This makes a difference for lubs in unsafeNulls mode.

We fix this by also doing simplification in Unpickler for trees
that can have types resulting from lubs.
I was not able to find out why that's the case, but the original test
case with the import in the function body requires that if's are _not_
simplified by Unpickler. The interaction with lubs and unsafenulls seems
to be very tricky.

Anyway, we now have two versions of all test cases, with local as well as
globak unsafe nulls.
Copy link
Member

@noti0na1 noti0na1 left a comment

Choose a reason for hiding this comment

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

Thanks for the Fix! LGTM

@noti0na1 noti0na1 merged commit d02c7c2 into scala:main May 5, 2022
@noti0na1 noti0na1 deleted the fix-15097 branch May 5, 2022 17:15
@Kordyjan Kordyjan added this to the 3.2.0 milestone Aug 1, 2023
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.

3 participants