@@ -676,7 +676,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
676676 javaSelectOnType(qual2)
677677
678678 case _ =>
679- errorTree(tree, " cannot convert to type selection" ) // will never be printed due to fallback
679+ errorTree(tree, em " cannot convert to type selection " ) // will never be printed due to fallback
680680 }
681681
682682 def selectWithFallback (fallBack : Context ?-> Tree ) =
@@ -1535,8 +1535,8 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
15351535 case _ =>
15361536 if (mt.isParamDependent)
15371537 errorTree(tree,
1538- i """ cannot turn method type $mt into closure
1539- |because it has internal parameter dependencies """ )
1538+ em """ cannot turn method type $mt into closure
1539+ |because it has internal parameter dependencies """ )
15401540 else if ((tree.tpt `eq` untpd.ContextualEmptyTree ) && mt.paramNames.isEmpty)
15411541 // Note implicitness of function in target type since there are no method parameters that indicate it.
15421542 TypeTree (defn.FunctionOf (Nil , mt.resType, isContextual = true , isErased = false ))
@@ -1784,7 +1784,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
17841784 var body1 = typedType(cdef.body, pt)
17851785 if ! body1.isType then
17861786 assert(ctx.reporter.errorsReported)
1787- body1 = TypeTree (errorType(" <error: not a type>" , cdef.srcPos))
1787+ body1 = TypeTree (errorType(em " <error: not a type> " , cdef.srcPos))
17881788 assignType(cpy.CaseDef (cdef)(pat2, EmptyTree , body1), pat2, body1)
17891789 }
17901790 caseRest(using ctx.fresh.setFreshGADTBounds.setNewScope)
@@ -1932,7 +1932,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
19321932 .withType(
19331933 if isFullyDefined(pt, ForceDegree .flipBottom) then pt
19341934 else if ctx.reporter.errorsReported then UnspecifiedErrorType
1935- else errorType(i " cannot infer type; expected type $pt is not fully defined " , tree.srcPos))
1935+ else errorType(em " cannot infer type; expected type $pt is not fully defined " , tree.srcPos))
19361936
19371937 def typedTypeTree (tree : untpd.TypeTree , pt : Type )(using Context ): Tree =
19381938 tree match
@@ -1946,7 +1946,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
19461946 // untyped tree is no longer accessed after all
19471947 // accesses with typedTypeTree are done.
19481948 case None =>
1949- errorTree(tree, " Something's wrong: missing original symbol for type tree" )
1949+ errorTree(tree, em " Something's wrong: missing original symbol for type tree " )
19501950 }
19511951 case _ =>
19521952 completeTypeTree(InferredTypeTree (), pt, tree)
@@ -1987,9 +1987,9 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
19871987 tree.args match
19881988 case arg :: _ if arg.isTerm =>
19891989 if Feature .dependentEnabled then
1990- return errorTree(tree, i " Not yet implemented: T(...) " )
1990+ return errorTree(tree, em " Not yet implemented: T(...) " )
19911991 else
1992- return errorTree(tree, dependentStr )
1992+ return errorTree(tree, dependentMsg )
19931993 case _ =>
19941994
19951995 val tpt1 = withoutMode(Mode .Pattern ) {
@@ -2128,9 +2128,9 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
21282128
21292129 def typedTermLambdaTypeTree (tree : untpd.TermLambdaTypeTree )(using Context ): Tree =
21302130 if Feature .dependentEnabled then
2131- errorTree(tree, i " Not yet implemented: (...) =>> ... " )
2131+ errorTree(tree, em " Not yet implemented: (...) =>> ... " )
21322132 else
2133- errorTree(tree, dependentStr )
2133+ errorTree(tree, dependentMsg )
21342134
21352135 def typedMatchTypeTree (tree : untpd.MatchTypeTree , pt : Type )(using Context ): Tree = {
21362136 val bound1 =
@@ -2162,7 +2162,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
21622162
21632163 def typedBind (tree : untpd.Bind , pt : Type )(using Context ): Tree = {
21642164 if ! isFullyDefined(pt, ForceDegree .all) then
2165- return errorTree(tree, i " expected type of $tree is not fully defined " )
2165+ return errorTree(tree, em " expected type of $tree is not fully defined " )
21662166 val body1 = typed(tree.body, pt)
21672167 body1 match {
21682168 case UnApply (fn, Nil , arg :: Nil )
@@ -3780,7 +3780,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
37803780 else
37813781 val meth = methPart(tree).symbol
37823782 if meth.isAllOf(DeferredInline ) && ! Inlines .inInlineMethod then
3783- errorTree(tree, i " Deferred inline ${meth.showLocated} cannot be invoked " )
3783+ errorTree(tree, em " Deferred inline ${meth.showLocated} cannot be invoked " )
37843784 else if Inlines .needsInlining(tree) then
37853785 tree.tpe <:< wildApprox(pt)
37863786 val errorCount = ctx.reporter.errorCount
0 commit comments