File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1604,7 +1604,8 @@ class Typer extends Namer
16041604 }
16051605
16061606 def typedSeqLiteral (tree : untpd.SeqLiteral , pt : Type )(using Context ): SeqLiteral = {
1607- val elemProto = pt.elemType match {
1607+ val pt1 = if ctx.explicitNulls then pt.stripNull else pt
1608+ val elemProto = pt1.elemType match {
16081609 case NoType => WildcardType
16091610 case bounds : TypeBounds => WildcardType (bounds)
16101611 case elemtp => elemtp
@@ -3518,6 +3519,8 @@ class Typer extends Namer
35183519 }
35193520
35203521 def tryUnsafeNullConver (fail : => Tree )(using Context ): Tree =
3522+ // println(tree.tpe)
3523+ // println(pt.stripAllNulls)
35213524 // If explicitNulls and unsafeNulls are enabled, and
35223525 if ctx.mode.is(Mode .UnsafeNullConversion ) && pt.isValueType &&
35233526 tree.tpe.isUnsafeConvertable(pt)
You can’t perform that action at this time.
0 commit comments