Skip to content

Commit 02cc1c6

Browse files
slothspotallanrenucci
authored andcommitted
Highlight Ident as type when it is type
1 parent 56f3c28 commit 02cc1c6

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
@@ -402,6 +402,8 @@ object SyntaxHighlighting {
402402
val treeHighlighter = new UntypedTreeTraverser {
403403
def traverse(tree: Tree)(implicit ctx: Context): Unit = {
404404
tree match {
405+
case id: Ident if id.isType =>
406+
highlightPosition(id.pos, TypeColor)
405407
case tpe : TypeDef =>
406408
highlightPosition(tpe.namePos, TypeColor)
407409
case _ : TypTree =>

0 commit comments

Comments
 (0)