Skip to content

Commit 31a91e1

Browse files
slothspotallanrenucci
authored andcommitted
Highlight Ident as type when it is type
1 parent df23392 commit 31a91e1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ object SyntaxHighlighting {
397397
val treeHighlighter = new UntypedTreeTraverser {
398398
def traverse(tree: Tree)(implicit ctx: Context): Unit = {
399399
tree match {
400+
case id: Ident if id.isType =>
401+
highlightPosition(id.pos, TypeColor)
400402
case tpe : TypeDef =>
401403
highlightPosition(tpe.namePos, TypeColor)
402404
case _ : TypTree =>

0 commit comments

Comments
 (0)