Skip to content

Commit 7c23027

Browse files
committed
Don't force message addendum
1 parent 2328fdf commit 7c23027

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ object ErrorReporting {
102102
case If(_, _, elsep @ Literal(Constant(()))) if elsep.span.isSynthetic =>
103103
"\nMaybe you are missing an else part for the conditional?"
104104
case _ => ""
105-
val addendum = List(implicitFailure.whyNoConversion, missingElse)
105+
def addendum = List(implicitFailure.whyNoConversion, missingElse)
106106
.find(!_.isEmpty).getOrElse("")
107107
errorTree(tree, TypeMismatch(treeTp, pt, addendum))
108108
}

0 commit comments

Comments
 (0)