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 @@ -118,7 +118,7 @@ final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) {
118118 if (kind != overallKind) {
119119 bad = true
120120 report.error(
121- em " export overload conflicts with export of $firstSym: they are of different types ( ${kind.show } / ${overallKind.show }) " ,
121+ em " export overload conflicts with export of $firstSym: they are of different types ( ${kind.tryToShow } / ${overallKind.tryToShow }) " ,
122122 info.pos)
123123 }
124124 }
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 @@ -599,7 +599,7 @@ object Parsers {
599599 if startIndentWidth <= nextIndentWidth then
600600 i """ Line is indented too far to the right, or a `{` is missing before:
601601 |
602- | ${t.show }"""
602+ | ${t.tryToShow }"""
603603 else
604604 in.spaceTabMismatchMsg(startIndentWidth, nextIndentWidth),
605605 in.next.offset
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ object Formatting {
8686 * against accidentally treating an interpolated value as a margin.
8787 */
8888 class StringFormatter (protected val sc : StringContext ) {
89- protected def showArg (arg : Any )(using Context ): String = arg.show
89+ protected def showArg (arg : Any )(using Context ): String = arg.tryToShow
9090
9191 private def treatArg (arg : Shown , suffix : String )(using Context ): (Any , String ) = arg match {
9292 case arg : Seq [? ] if suffix.nonEmpty && suffix.head == '%' =>
Original file line number Diff line number Diff line change @@ -774,7 +774,7 @@ private class ExtractAPICollector(using Context) extends ThunkHolder {
774774 case n : Name =>
775775 h = nameHash(n, h)
776776 case elem =>
777- cannotHash(what = i " ` ${elem.show }` of unknown class ${elem.getClass}" , elem, tree)
777+ cannotHash(what = i " ` ${elem.tryToShow }` of unknown class ${elem.getClass}" , elem, tree)
778778 h
779779 end iteratorHash
780780
You can’t perform that action at this time.
0 commit comments