File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed
Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) {
119119 if (kind != overallKind) {
120120 bad = true
121121 report.error(
122- em " export overload conflicts with export of $firstSym: they are of different types ( ${kind.show } / ${overallKind.show }) " ,
122+ em " export overload conflicts with export of $firstSym: they are of different types ( ${kind.tryToShow } / ${overallKind.tryToShow }) " ,
123123 info.pos)
124124 }
125125 }
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ object Decorators {
259259 }
260260
261261 /** Instead of `toString` call `show` on `Showable` values, falling back to `toString` if an exception is raised. */
262- def show (using Context ): String = x match
262+ def tryToShow (using Context ): String = x match
263263 case x : Showable =>
264264 try x.show
265265 catch
Original file line number Diff line number Diff line change @@ -606,7 +606,7 @@ object Parsers {
606606 if startIndentWidth <= nextIndentWidth then
607607 i """ Line is indented too far to the right, or a `{` is missing before:
608608 |
609- | ${t.show }"""
609+ | ${t.tryToShow }"""
610610 else
611611 in.spaceTabMismatchMsg(startIndentWidth, nextIndentWidth),
612612 in.next.offset
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ object Formatting {
8888 * against accidentally treating an interpolated value as a margin.
8989 */
9090 class StringFormatter (protected val sc : StringContext ) {
91- protected def showArg (arg : Any )(using Context ): String = arg.show
91+ protected def showArg (arg : Any )(using Context ): String = arg.tryToShow
9292
9393 private def treatArg (arg : Shown , suffix : String )(using Context ): (Any , String ) = arg match {
9494 case arg : Seq [? ] if suffix.nonEmpty && suffix.head == '%' =>
Original file line number Diff line number Diff line change @@ -776,7 +776,7 @@ private class ExtractAPICollector(using Context) extends ThunkHolder {
776776 case n : Name =>
777777 h = nameHash(n, h)
778778 case elem =>
779- cannotHash(what = i " ` ${elem.show }` of unknown class ${elem.getClass}" , elem, tree)
779+ cannotHash(what = i " ` ${elem.tryToShow }` of unknown class ${elem.getClass}" , elem, tree)
780780 h
781781 end iteratorHash
782782
You can’t perform that action at this time.
0 commit comments