Skip to content

Commit 4494c16

Browse files
committed
Make Bind nodes type trees depending on bound name.
Bind nodes were always TermTrees, which is wrong.
1 parent 21fa5dd commit 4494c16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,8 @@ object Trees {
594594
case class Bind[-T >: Untyped] private[ast] (name: Name, body: Tree[T])
595595
extends NameTree[T] with DefTree[T] with PatternTree[T] {
596596
type ThisTree[-T >: Untyped] = Bind[T]
597+
override def isType = name.isTypeName
598+
override def isTerm = name.isTermName
597599
override def envelope: Position = pos union initialPos
598600
}
599601

0 commit comments

Comments
 (0)