File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
compiler/src/dotty/tools/dotc/printing Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import language.implicitConversions
4
4
5
5
object Texts {
6
6
7
- abstract class Text {
7
+ sealed abstract class Text {
8
8
9
9
protected def indentMargin = 2
10
10
@@ -46,9 +46,11 @@ object Texts {
46
46
case Str (s1, lines2) => Str (s1 + s2, lines1 union lines2)
47
47
case Fluid (Str (s1, lines2) :: prev) => Fluid (Str (s1 + s2, lines1 union lines2) :: prev)
48
48
case Fluid (relems) => Fluid (that :: relems)
49
+ case Vertical (_) => throw new IllegalArgumentException (" Unexpected Vertical.appendToLastLine" )
49
50
}
50
51
case Fluid (relems) =>
51
52
(this /: relems.reverse)(_ appendToLastLine _)
53
+ case Vertical (_) => throw new IllegalArgumentException (" Unexpected Text.appendToLastLine(Vertical(...))" )
52
54
}
53
55
54
56
private def appendIndented (that : Text )(width : Int ): Text =
You can’t perform that action at this time.
0 commit comments