Skip to content

Commit aec72ee

Browse files
committed
Remove unnecessary isTermHole method from Hole
1 parent 46cd9c9 commit aec72ee

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,16 +1033,15 @@ object Trees {
10331033
/** Tree that replaces a level 1 splices in pickled (level 0) quotes.
10341034
* It is only used when picking quotes (will never be in a TASTy file).
10351035
*
1036-
* @param isTermHole If this hole is a term, otherwise it is a type hole.
1036+
* @param isTerm If this hole is a term, otherwise it is a type hole.
10371037
* @param idx The index of the hole in it's enclosing level 0 quote.
10381038
* @param args The arguments of the splice to compute its content
10391039
* @param content Lambda that computes the content of the hole. This tree is empty when in a quote pickle.
10401040
* @param tpt Type of the hole
10411041
*/
1042-
case class Hole[+T <: Untyped](isTermHole: Boolean, idx: Int, args: List[Tree[T]], content: Tree[T], tpt: Tree[T])(implicit @constructorOnly src: SourceFile) extends Tree[T] {
1042+
case class Hole[+T <: Untyped](override val isTerm: Boolean, idx: Int, args: List[Tree[T]], content: Tree[T], tpt: Tree[T])(implicit @constructorOnly src: SourceFile) extends Tree[T] {
10431043
type ThisTree[+T <: Untyped] <: Hole[T]
1044-
override def isTerm: Boolean = isTermHole
1045-
override def isType: Boolean = !isTermHole
1044+
override def isType: Boolean = !isTerm
10461045
}
10471046

10481047
def flatten[T <: Untyped](trees: List[Tree[T]]): List[Tree[T]] = {

0 commit comments

Comments
 (0)