Skip to content

Commit

Permalink
Patch library, since it always compiles in bootstrapped mode
Browse files Browse the repository at this point in the history
It's unclear why it wasn't failing before, but now it does.
Patch the problem locally, but this patch will be subsumed when we make
the compiler bootstrapping.
  • Loading branch information
abeln committed Nov 9, 2018
1 parent 1ccec86 commit a83edf5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/src/scala/tasty/util/ShowSourceCode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,9 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
case '"' => "\\\""
case '\'' => "\\\'"
case '\\' => "\\\\"
case _ => if (ch.isControl) "\\0" + Integer.toOctalString(ch) else String.valueOf(ch)
case _ =>
// TODO(abeln): remove `asInstanceOf` once we do the more general bootstrapping of the compiler.
if (ch.isControl) "\\0" + Integer.toOctalString(ch) else String.valueOf(ch).asInstanceOf[String]
}

private def escapedString(str: String): String = str flatMap escapedChar
Expand Down

0 comments on commit a83edf5

Please sign in to comment.