diff options
author | Paul Phillips <paulp@improving.org> | 2011-01-09 04:11:43 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-01-09 04:11:43 +0000 |
commit | d4748121aa58aa048a751a02d8f9910deab7f915 (patch) | |
tree | 5c9a3a55a14bc8e1c8f99d23f7da0d9322f9e22a /src/continuations | |
parent | 0dea879a7663a3b46ae7edab609ba06b425845cb (diff) | |
download | scala-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/continuations')
-rw-r--r-- | src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala b/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala index 9f38b9c15a..5151f1eeee 100644 --- a/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala +++ b/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala @@ -362,7 +362,7 @@ abstract class CPSAnnotationChecker extends CPSUtils { tree match { - case Apply(fun @ Select(qual, name), args) if (fun.tpe ne null) && !fun.tpe.isErroneous => + case Apply(fun @ Select(qual, name), args) if fun.isTyped => // HACK: With overloaded methods, fun will never get annotated. This is because // the 'overloaded' type gets annotated, but not the alternatives (among which @@ -372,12 +372,12 @@ abstract class CPSAnnotationChecker extends CPSUtils { transChildrenInOrder(tree, tpe, qual::(transArgList(fun, args).flatten), Nil) - case TypeApply(fun @ Select(qual, name), args) if (fun.tpe ne null) && !fun.tpe.isErroneous => + case TypeApply(fun @ Select(qual, name), args) if fun.isTyped => vprintln("[checker] checking select apply " + tree + "/" + tpe) transChildrenInOrder(tree, tpe, List(qual, fun), Nil) - case Apply(fun, args) if (fun.tpe ne null) && !fun.tpe.isErroneous => + case Apply(fun, args) if fun.isTyped => vprintln("[checker] checking unknown apply " + tree + "/" + tpe) @@ -389,7 +389,7 @@ abstract class CPSAnnotationChecker extends CPSUtils { transChildrenInOrder(tree, tpe, List(fun), Nil) - case Select(qual, name) => + case Select(qual, name) if qual.isTyped => vprintln("[checker] checking select " + tree + "/" + tpe) |