Skip to content

Commit 84c217c

Browse files
committed
Highlight Ident as type when it is type
1 parent 685a0ed commit 84c217c

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
@@ -398,6 +398,8 @@ object SyntaxHighlighting {
398398
val treeHighlighter = new UntypedTreeTraverser {
399399
def traverse(tree: Tree)(implicit ctx: Context): Unit = {
400400
tree match {
401+
case id: Ident if id.isType =>
402+
highlightPosition(id.pos, TypeColor)
401403
case tpe : TypeDef =>
402404
highlightPosition(tpe.namePos, TypeColor)
403405
case _ : TypTree =>

0 commit comments

Comments
 (0)