summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-09 04:11:43 +0000
committerPaul Phillips <paulp@improving.org>2011-01-09 04:11:43 +0000
commitd4748121aa58aa048a751a02d8f9910deab7f915 (patch)
tree5c9a3a55a14bc8e1c8f99d23f7da0d9322f9e22a /src/compiler
parent0dea879a7663a3b46ae7edab609ba06b425845cb (diff)
downloadscala-d4748121aa58aa048a751a02d8f9910deab7f915.tar.gz
scala-d4748121aa58aa048a751a02d8f9910deab7f915.tar.bz2
scala-d4748121aa58aa048a751a02d8f9910deab7f915.zip
Warded off an NPE (which only arose on erroneou...
Warded off an NPE (which only arose on erroneous code) in the continuations plugin. Closes #4132, no review.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/ast/Trees.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/Trees.scala b/src/compiler/scala/tools/nsc/ast/Trees.scala
index 25c053c36d..30af9b0e8e 100644
--- a/src/compiler/scala/tools/nsc/ast/Trees.scala
+++ b/src/compiler/scala/tools/nsc/ast/Trees.scala
@@ -59,6 +59,7 @@ trait Trees extends reflect.generic.Trees { self: SymbolTable =>
}
def isErroneous = (tree.tpe ne null) && tree.tpe.isErroneous
+ def isTyped = (tree.tpe ne null) && !tree.tpe.isErroneous
/** Apply `f' to each subtree */
def foreach(f: Tree => Unit) { new ForeachTreeTraverser(f).traverse(tree) }