summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-06-28 03:53:06 -0700
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-06-28 03:53:06 -0700
commitdf00b410635cd3164b74ab55d1b44fd772a65653 (patch)
tree9c5fa36022898eace09b431f3b05dfb1cc4545ea /src/compiler
parent2261452d18e955e16bbe43e7a21e8d79c44325e8 (diff)
parent1a3976fc8276e6e3d7eeda12f645782ca93ea24b (diff)
downloadscala-df00b410635cd3164b74ab55d1b44fd772a65653.tar.gz
scala-df00b410635cd3164b74ab55d1b44fd772a65653.tar.bz2
scala-df00b410635cd3164b74ab55d1b44fd772a65653.zip
Merge pull request #783 from phaller/topic/cps-return-revert
Revert pull request #720 (CPS: enable return expressions in CPS code if ...
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Modes.scala4
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala3
2 files changed, 1 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Modes.scala b/src/compiler/scala/tools/nsc/typechecker/Modes.scala
index bde3ad98c9..3eff5ef024 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Modes.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Modes.scala
@@ -86,10 +86,6 @@ trait Modes {
*/
final val TYPEPATmode = 0x10000
- /** RETmode is set when we are typing a return expression.
- */
- final val RETmode = 0x20000
-
final private val StickyModes = EXPRmode | PATTERNmode | TYPEmode | ALTmode
final def onlyStickyModes(mode: Int) =
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 688c842637..d251109dc4 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -4024,8 +4024,7 @@ trait Typers extends Modes with Adaptations with Tags {
ReturnWithoutTypeError(tree, enclMethod.owner)
} else {
context.enclMethod.returnsSeen = true
- val expr1: Tree = typed(expr, EXPRmode | BYVALmode | RETmode, restpt.tpe)
-
+ val expr1: Tree = typed(expr, EXPRmode | BYVALmode, restpt.tpe)
// Warn about returning a value if no value can be returned.
if (restpt.tpe.typeSymbol == UnitClass) {
// The typing in expr1 says expr is Unit (it has already been coerced if