diff options
author | Martin Odersky <odersky@gmail.com> | 2013-08-01 18:21:23 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-08-01 18:21:23 +0200 |
commit | dbb4b3f7923427af4ba6e04f258309421d5ee1ab (patch) | |
tree | c8d47cbae32a0778d0bff3a22117d9d4a7c5ff7f /src/dotty/tools/dotc/ast/TreeInfo.scala | |
parent | 413f364887d5bde7610adbbc08020e23470b4c8c (diff) | |
download | dotty-dbb4b3f7923427af4ba6e04f258309421d5ee1ab.tar.gz dotty-dbb4b3f7923427af4ba6e04f258309421d5ee1ab.tar.bz2 dotty-dbb4b3f7923427af4ba6e04f258309421d5ee1ab.zip |
Handling typevars in inference.
Fleshed out handling of typevars for type inference. Also added some more methods to typer, for blocks, ifs and assignments. (Closures are still wip).
Diffstat (limited to 'src/dotty/tools/dotc/ast/TreeInfo.scala')
-rw-r--r-- | src/dotty/tools/dotc/ast/TreeInfo.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/ast/TreeInfo.scala b/src/dotty/tools/dotc/ast/TreeInfo.scala index de00cee7e..9fcbeeea4 100644 --- a/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -99,6 +99,11 @@ trait TreeInfo[T >: Untyped] { self: Trees.Instance[T] => case _ => false } + def isSuperSelection(tree: untpd.Tree) = tree match { + case Select(Super(_, _), _) => true + case _ => false + } + def isSelfOrSuperConstrCall(tree: Tree): Boolean = methPart(tree) match { case Ident(nme.CONSTRUCTOR) | Select(This(_), nme.CONSTRUCTOR) |