Skip to content

Commit 179ca1e

Browse files
committed
update comment on truncate, mention Scala 2 bug
1 parent 038276d commit 179ca1e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/src/dotty/tools/repl/Rendering.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ private[repl] class Rendering(parentClassLoader: Option[ClassLoader] = None) {
6464
myClassLoader
6565
}
6666

67-
/** Used to elide output in replStringOf. TODO: Implement setting scala.repl.maxprintstring as in Scala 2 */
67+
/** Used to elide output in replStringOf.
68+
* TODO: Perhaps implement setting scala.repl.maxprintstring as in Scala 2, but
69+
* then this bug will surface, so perhaps better not?
70+
* https://github.com/scala/bug/issues/12337
71+
*/
6872
private[repl] def truncate(str: String): String =
6973
if str.length > MaxStringElements then str.take(MaxStringElements - 3) + "..."
7074
else str

0 commit comments

Comments
 (0)