From 7f9ea6279e8d7dc6750df50975d9d366c7ab9b42 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Mon, 11 Sep 2017 11:31:50 +0200 Subject: [PATCH] Avoid pattern match warning --- compiler/src/dotty/tools/repl/terminal/Utils.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/src/dotty/tools/repl/terminal/Utils.scala b/compiler/src/dotty/tools/repl/terminal/Utils.scala index dad7dc61dd5f..ddf234b2bac8 100644 --- a/compiler/src/dotty/tools/repl/terminal/Utils.scala +++ b/compiler/src/dotty/tools/repl/terminal/Utils.scala @@ -199,8 +199,9 @@ object FrontEndUtils { .grouped(math.ceil(snippets.length * 1.0 / columns).toInt) .toList - transpose(grouped).iterator.flatMap { - case first :+ last => first.map( + transpose(grouped).iterator.flatMap { group => + val last = group.last + group.init.map( x => x ++ " " * (width / columns - x.length) ) :+ last :+ Ansi.Str.parse(newLine) }