Skip to content

Commit 81f36c9

Browse files
committed
Drop unused method in TreeInfo
I overlooked that we actually have a `closure` extractor, which would do the job of `isClosure`, if we ever needed it.
1 parent 08442eb commit 81f36c9

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,6 @@ trait UntypedTreeInfo extends TreeInfo[Untyped] { self: Trees.Instance[Untyped]
280280
case _ => false
281281
}
282282

283-
/** Is tree a Function or Closure node, possibly preceded by definitions? (currently unused) */
284-
def isClosure(tree: Tree)(implicit ctx: Context): Boolean = unsplice(tree) match {
285-
case _: Function | _: Closure => true
286-
case Block(_, expr) => isClosure(expr)
287-
case _ => false
288-
}
289-
290283
/** Is `tree` an implicit function or closure, possibly nested in a block? */
291284
def isImplicitClosure(tree: Tree)(implicit ctx: Context): Boolean = unsplice(tree) match {
292285
case Function((param: untpd.ValDef) :: _, _) => param.mods.is(Implicit)
@@ -717,7 +710,7 @@ object TreeInfo {
717710
/*
718711
def isAbsTypeDef(tree: Tree) = tree match {
719712
case TypeDef(_, _, _, TypeBoundsTree(_, _)) => true
720-
case TypeDef(_, _, _, rhs) => rhs.tpe.isInstanceOf[TypeBounds]
713+
case TypeDef(_, _, _, rhs) => rhs.tpe. isInstanceOf[TypeBounds]
721714
case _ => false
722715
}
723716

0 commit comments

Comments
 (0)