Skip to content

Commit cb90ed2

Browse files
committed
fix
1 parent 2a4a1c1 commit cb90ed2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ object SyntaxHighlighting {
8080
case IDENTIFIER if name == nme.??? =>
8181
highlightRange(start, end, Console.RED_B)
8282

83-
case IDENTIFIER if name.head.isUpper =>
84-
highlightRange(start, end, TypeColor)
83+
case IDENTIFIER if name.head.isUpper && name.exists(!_.isUpper) =>
84+
highlightRange(start, end, KeywordColor)
8585

8686
case _ =>
8787
}

compiler/test-resources/repl/i18383

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ scala> class Foo { import scala.util.*; println("foo") }
1111
// defined class Foo
1212

1313
scala> { import scala.util.*; "foo" }
14-
val res0: String = foo
14+
val res0: String = "foo"

0 commit comments

Comments
 (0)