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 79a1a52 commit 5f8c59aCopy full SHA for 5f8c59a
compiler/src/dotty/tools/dotc/core/ImplicitNullInterop.scala
@@ -158,9 +158,12 @@ object ImplicitNullInterop {
158
// type of a final non-nullable field.
159
case tp: ExprType => mapOver(tp)
160
case tp: AnnotatedType => mapOver(tp)
161
- case tp: OrType => mapOver(tp)
162
- case tp: MatchType => mapOver(tp)
163
- case tp: RefinedType => nullify(mapOver(tp))
+ case tp: OrType =>
+ outermostLevelAlreadyNullable = true
+ nullify(derivedOrType(tp, this(tp.tp1), this(tp.tp2)))
164
+ case tp: RefinedType =>
165
166
+ nullify(mapOver(tp))
167
case _ => tp
168
}
169
0 commit comments