File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
src/dotty/tools/dotc/printing
staging/test-resources/repl-staging Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ object SyntaxHighlighting {
27
27
val CommentColor : String = Console .BLUE
28
28
val KeywordColor : String = Console .YELLOW
29
29
val ValDefColor : String = Console .CYAN
30
- val LiteralColor : String = Console .RED
30
+ val LiteralColor : String = Console .GREEN
31
31
val StringColor : String = Console .GREEN
32
32
val TypeColor : String = Console .MAGENTA
33
33
val AnnotationColor : String = Console .MAGENTA
@@ -80,6 +80,9 @@ object SyntaxHighlighting {
80
80
case IDENTIFIER if name == nme.??? =>
81
81
highlightRange(start, end, Console .RED_B )
82
82
83
+ case IDENTIFIER if name.head.isUpper =>
84
+ highlightRange(start, end, TypeColor )
85
+
83
86
case _ =>
84
87
}
85
88
}
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ class ReplCompilerTests extends ReplTest:
77
77
assertEquals(1 , summon[State ].imports.size)
78
78
run(""" mutable.Map("one" -> 1)""" )
79
79
assertEquals(
80
- " val res0: scala.collection.mutable.Map[String, Int] = Map (\" one\" -> 1)" ,
80
+ " val res0: scala.collection.mutable.Map[String, Int] = HashMap (\" one\" -> 1)" ,
81
81
storedOutput().trim
82
82
)
83
83
}
@@ -262,7 +262,7 @@ class ReplCompilerTests extends ReplTest:
262
262
263
263
@ Test def testSingletonPrint = initially {
264
264
run(""" val a = "hello"; val x: a.type = a""" )
265
- assertMultiLineEquals(" val a: String = hello\n val x: a.type = \" hello\" " , storedOutput().trim)
265
+ assertMultiLineEquals(" val a: String =\" hello\" \n val x: a.type = \" hello\" " , storedOutput().trim)
266
266
}
267
267
268
268
@ Test def i6574 = initially {
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ def compiler: scala.quoted.staging.Compiler
5
5
scala> def v(using Quotes) = '{ (if true then Some(1) else None).map(v => v+1) }
6
6
def v(using x$1: scala.quoted.Quotes): scala.quoted.Expr[Option[Int]]
7
7
scala> scala.quoted.staging.withQuotes(v.show)
8
- val res0: String = (if (true) scala.Some.apply[scala.Int](1) else scala.None).map[scala.Int](((v: scala.Int) => v.+(1)))
8
+ val res0: String = " (if (true) scala.Some.apply[scala.Int](1) else scala.None).map[scala.Int](((v: scala.Int) => v.+(1)))"
9
9
scala> scala.quoted.staging.run(v)
10
10
val res1: Option[Int] = Some(2)
You can’t perform that action at this time.
0 commit comments