Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Jan 23, 2021

The bit is set if

  • -Yexplicit-nulls is set
  • we are not in an import.unsafeNulls scope
@odersky
Copy link
Contributor Author

odersky commented Jan 23, 2021

@noti0na1 This might be a good basis for the explicit-nulls PR.

@noti0na1
Copy link
Member

@odersky Thanks! I will take a look

@noti0na1
Copy link
Member

I have merged this branch into my PR.
One small modification is required: when we add the SafeNulls bit, we also need to check the unsafeNulls language feature is not set globally.
It seems we can use the new Mode bit to check UnsafeNulls at all places. The StickyKey is no longer needed as well.

Make sure that something is a language import if and only if it looks like one. i.e. is of one of the forms import language.xyz import scala.language.xyz import _root_.scala.language.xyz
Avoid a notation of "owner" when checking for a language feature. Instead, allow qualified names for language features, e.g. `experimental.dependent".
The bit is set if - -Yexplicit-nulls is set - we are not in an `import.unsafeNulls` scope
@odersky odersky merged commit 3b741d6 into scala:master Feb 1, 2021
@odersky odersky deleted the add-safenull-mode branch February 1, 2021 18:37
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants