File tree Expand file tree Collapse file tree 5 files changed +7
-9
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 5 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ object desugar {
117117 if (local.exists) (defctx.owner.thisType select local).dealiasKeepAnnots
118118 else {
119119 def msg =
120- s " no matching symbol for ${tp.symbol.showLocated} in ${defctx.owner} / ${defctx.effectiveScope.toList}"
120+ em " no matching symbol for ${tp.symbol.showLocated} in ${defctx.owner} / ${defctx.effectiveScope.toList}"
121121 ErrorType (msg).assertingErrorsReported(msg)
122122 }
123123 case _ =>
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ object Decorators {
287287 assert(ctx.reporter.errorsReported)
288288 x
289289 }
290- def assertingErrorsReported (msg : => String )(using Context ): T = {
290+ def assertingErrorsReported (msg : Message )(using Context ): T = {
291291 assert(ctx.reporter.errorsReported, msg)
292292 x
293293 }
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ object NamerOps:
7070 def findModuleBuddy (name : Name , scope : Scope )(using Context ) = {
7171 val it = scope.lookupAll(name).filter(_.is(Module ))
7272 if (it.hasNext) it.next()
73- else NoSymbol .assertingErrorsReported(s " no companion $name in $scope" )
73+ else NoSymbol .assertingErrorsReported(em " no companion $name in $scope" )
7474 }
7575
7676 /** If a class has one of these flags, it does not get a constructor companion */
Original file line number Diff line number Diff line change @@ -5304,8 +5304,6 @@ object Types {
53045304 val et = new PreviousErrorType
53055305 ctx.base.errorTypeMsg(et) = m
53065306 et
5307- def apply (s : => String )(using Context ): ErrorType =
5308- apply(s.toMessage)
53095307 end ErrorType
53105308
53115309 class PreviousErrorType extends ErrorType :
Original file line number Diff line number Diff line change @@ -77,10 +77,10 @@ object Splicer {
7777 ref(defn.Predef_undefined ).withType(ErrorType (ex.msg))
7878 case NonFatal (ex) =>
7979 val msg =
80- s """ Failed to evaluate macro.
81- | Caused by ${ex.getClass}: ${if (ex.getMessage == null ) " " else ex.getMessage}
82- | ${ex.getStackTrace.takeWhile(_.getClassName != " dotty.tools.dotc.transform.Splicer$" ).drop(1 ).mkString(" \n " )}
83- """ .stripMargin
80+ em """ Failed to evaluate macro.
81+ | Caused by ${ex.getClass}: ${if (ex.getMessage == null ) " " else ex.getMessage}
82+ | ${ex.getStackTrace.takeWhile(_.getClassName != " dotty.tools.dotc.transform.Splicer$" ).drop(1 ).mkString(" \n " )}
83+ """
8484 report.error(msg, spliceExpansionPos)
8585 ref(defn.Predef_undefined ).withType(ErrorType (msg))
8686 }
You can’t perform that action at this time.
0 commit comments