File tree 2 files changed +7
-3
lines changed
src/dotty/tools/dotc/printing
test/dotty/tools/dotc/printing
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ object SyntaxHighlighting {
112
112
highlightPosition(tree.nameSpan, TypeColor )
113
113
case tree : Ident if tree.isType =>
114
114
highlightPosition(tree.span, TypeColor )
115
- case _ : TypTree =>
115
+ case _ : TypeTree =>
116
116
highlightPosition(tree.span, TypeColor )
117
117
case _ =>
118
118
}
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ class SyntaxHighlightingTests extends DottyTest {
23
23
24
24
if (expected != highlighted) {
25
25
// assertEquals produces weird expected/found message
26
- fail(s " expected: $expected but was: $highlighted" )
26
+ fail(s """ |
27
+ |expected: $expected
28
+ |highlighted: $highlighted""" .stripMargin)
27
29
}
28
30
}
29
31
@@ -41,6 +43,8 @@ class SyntaxHighlightingTests extends DottyTest {
41
43
test(" type Foo = Int" , " <K|type> <T|Foo> = <T|Int>" )
42
44
test(" type A = String | Int" , " <K|type> <T|A> = <T|String> <T||> <T|Int>" )
43
45
test(" type B = String & Int" , " <K|type> <T|B> = <T|String> <T|&> <T|Int>" )
46
+ test(" type Id[A] = A" , " <K|type> <T|Id>[<T|A>] = <T|A>" )
47
+ test(" type Foo = [X] =>> List[X]" , " <K|type> <T|Foo> = [<T|X>] =>> <T|List>[<T|X>]" )
44
48
}
45
49
46
50
@ Test
@@ -111,7 +115,7 @@ class SyntaxHighlightingTests extends DottyTest {
111
115
test(" def f1(x: Int) = 123" , " <K|def> <V|f1>(<V|x>: <T|Int>) = <L|123>" )
112
116
test(" def f2[T](x: T) = { 123 }" , " <K|def> <V|f2>[<T|T>](<V|x>: <T|T>) = { <L|123> }" )
113
117
114
- test(" def f3[T[_" , " <K|def> <V|f3>[<T|T>[<T|_> " )
118
+ test(" def f3[T[_" , " <K|def> <V|f3>[<T|T>[_ " )
115
119
}
116
120
117
121
@ Test
You can’t perform that action at this time.
0 commit comments