We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1d51c22 + 34093e9 commit 3ed3e3fCopy full SHA for 3ed3e3f
src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
@@ -531,7 +531,7 @@ trait TypeDiagnostics extends splain.SplainDiagnostics {
531
532
// so trivial that it never consumes params
533
def isTrivial(rhs: Tree): Boolean =
534
- rhs.symbol == Predef_??? || rhs.tpe =:= NothingTpe || (rhs match {
+ rhs.symbol == Predef_??? || rhs.tpe == null || rhs.tpe =:= NothingTpe || (rhs match {
535
case Literal(_) => true
536
case _ => isConstantType(rhs.tpe) || isSingleType(rhs.tpe)
537
})
0 commit comments