We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f031eab commit fa957caCopy full SHA for fa957ca
compiler/src/dotty/tools/dotc/core/ImplicitNullInterop.scala
@@ -107,10 +107,13 @@ object ImplicitNullInterop {
107
case tp: TypeRef if !tp.hasSimpleKind
108
// We don't modify value types because they're non-nullable even in Java.
109
|| tp.symbol.isValueClass
110
+ || tp.isRef(defn.NullClass)
111
+ || tp.isRef(defn.NothingClass)
112
// We don't modify unit types.
113
|| tp.isRef(defn.UnitClass)
114
// We don't modify `Any` because it's already nullable.
115
|| tp.isRef(defn.AnyClass) => false
116
+ case tp: TypeParamRef if !tp.hasSimpleKind => false
117
case _ => true
118
119
// We don't nullify Java varargs at the top level.
0 commit comments