Commit 79f7101
committed
gate Null <: TermRef under safeNulls for consistency with TypeRef
The spec for conformance currently says:
```
- `´S =´ scala.Null` and:
- ´T = q.C[T_1, ..., T_n]´ with ´n \geq 0´ and ´C´ does not derive from `scala.AnyVal` and ´C´ is not the hidden class of an `object`, or
- ´T = q.x´ is a term designator with underlying type ´U´ and `scala.Null ´<: U´`, or
```
https://github.com/scala/scala3/blob/10770098fb9cbdef238fc677979a19a5bfb5ba7c/docs/_spec/03-types.md?plain=1#L1497-L1499
Under explicit nulls, the former is changed only in a safe-nulls context,
but the latter is changed even in unsafe nulls. This change gates both under
safe-nulls for consistency.1 parent 1077009 commit 79f7101
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1037 | 1037 | | |
1038 | 1038 | | |
1039 | 1039 | | |
1040 | | - | |
| 1040 | + | |
1041 | 1041 | | |
1042 | 1042 | | |
1043 | | - | |
| 1043 | + | |
1044 | 1044 | | |
1045 | 1045 | | |
1046 | 1046 | | |
| |||
0 commit comments