diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-11 13:02:54 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-11 13:02:54 -0700 |
commit | b174efbcbcf241903d2dc970f950f594b8c8c5e7 (patch) | |
tree | b6973b380c7fcc5590fe9ae1e14f978414573f51 /src/continuations | |
parent | 1c1d45d08f5d303d00e97383722b10f9c9395f4e (diff) | |
download | scala-b174efbcbcf241903d2dc970f950f594b8c8c5e7.tar.gz scala-b174efbcbcf241903d2dc970f950f594b8c8c5e7.tar.bz2 scala-b174efbcbcf241903d2dc970f950f594b8c8c5e7.zip |
Eliminated RETmode.
It becomes context mode "ReturnExpr".
Diffstat (limited to 'src/continuations')
-rw-r--r-- | src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala b/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala index 519b90f0c6..e6153596f7 100644 --- a/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala +++ b/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala @@ -169,7 +169,7 @@ abstract class CPSAnnotationChecker extends CPSUtils { true //} } else false - } else if (!hasPlusMarker(tree.tpe) && annots1.isEmpty && !annots2.isEmpty && mode.inRetMode) { + } else if (!hasPlusMarker(tree.tpe) && annots1.isEmpty && !annots2.isEmpty && typer.context.inReturnExpr) { vprintln("checking enclosing method's result type without annotations") tree.tpe <:< pt.withoutAnnotations } else if (!hasMinusMarker(tree.tpe) && !annots1.isEmpty && mode.inByValMode) { @@ -219,7 +219,7 @@ abstract class CPSAnnotationChecker extends CPSUtils { val res = tree modifyType addMinusMarker vprintln("adapted annotations (by val) of " + tree + " to " + res.tpe) res - } else if (mode.inRetMode && !hasPlusMarker(tree.tpe) && isMissingExpectedAnnots) { + } else if (typer.context.inReturnExpr && !hasPlusMarker(tree.tpe) && isMissingExpectedAnnots) { // add a marker annotation that will make tree.tpe behave as pt, subtyping wise // tree will look like having any possible annotation |