From 289fd3d7307ca117a419e71e3a20b0b811a0d33f Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 5 Apr 2007 15:01:04 +0000 Subject: small changes to supercalls --- src/compiler/scala/tools/nsc/ast/TreeInfo.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/compiler/scala/tools/nsc/ast/TreeInfo.scala') diff --git a/src/compiler/scala/tools/nsc/ast/TreeInfo.scala b/src/compiler/scala/tools/nsc/ast/TreeInfo.scala index aba34b0d51..0ce35746ab 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeInfo.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeInfo.scala @@ -128,6 +128,17 @@ abstract class TreeInfo { false } + def isSuperConstrCall(tree: Tree): boolean = tree match { + case Select(Super(_, _), nme.CONSTRUCTOR) => + true + case TypeApply(constr, _) => + isSuperConstrCall(constr) + case Apply(constr, _) => + isSuperConstrCall(constr) + case _ => + false + } + /** Is tree a variable pattern */ def isVarPattern(pat: Tree): boolean = pat match { case Ident(name) => isVariableName(name) && !pat.isInstanceOf[BackQuotedIdent] -- cgit v1.2.3