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

Honor language imports when unpickling #14962

Merged
merged 3 commits into from
Apr 19, 2022
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 18, 2022

Fixes #14947

@odersky odersky changed the title Honor language imports mode when unpickling Honor language imports when unpickling Apr 18, 2022
@odersky odersky requested a review from noti0na1 April 18, 2022 12:42
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.

Could you copy the test to tests/explicit-nulls/pos-special as well, and add the pickling test flags?

@noti0na1 noti0na1 assigned odersky and unassigned noti0na1 Apr 18, 2022
@odersky odersky assigned noti0na1 and unassigned odersky Apr 18, 2022
@noti0na1
Copy link
Member

Hi,

I tried this fix, but it does not work when the unsafeNulls import is inside a function:

class C {
  def g: String | Null = ???

  def f =
    import scala.language.unsafeNulls
    if true then "" else g
}

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 this fix! LGTM

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.

Pickling difference error with explicit nulls and unsafe nulls
3 participants