You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple return statement fails when CPS transformed. The same statement without CPS annotations works properly so the code structure itself is OK.
This form should be able to be transformed.
import scala.util.continuations._
object Test {
def test1(): Int @cps[Int] = {
return 1
}
def main(args: Array[String]): Any = {
println(reset(test1()))
}
}
$ ~/opt/scala-2.10.0.dev-1302-g6a33a20/bin/scala -P:continuations:enable returnX.scala
/p/scala/bugs/returnX.scala:8: error: type mismatch;
found : Int(1)
required: Int @util.continuations.cps[Int]
return 1
^
one error found
The text was updated successfully, but these errors were encountered:
A simple return statement fails when CPS transformed. The same statement without CPS annotations works properly so the code structure itself is OK.
This form should be able to be transformed.
The text was updated successfully, but these errors were encountered: