We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de3a1c8 commit d273d89Copy full SHA for d273d89
compiler/src/dotty/tools/dotc/transform/Erasure.scala
@@ -205,6 +205,8 @@ object Erasure extends TypeTestsCasts{
205
val tree1 =
206
if (tree.tpe isRef defn.NullClass)
207
adaptToType(tree, underlying)
208
+ else if (wasPhantom(underlying))
209
+ PhantomErasure.erasedParameterRef
210
else if (!(tree.tpe <:< tycon)) {
211
assert(!(tree.tpe.typeSymbol.isPrimitiveValueClass))
212
val nullTree = Literal(Constant(null))
0 commit comments