Created
November 7, 2011 22:24
-
-
Save einblicker/1346399 to your computer and use it in GitHub Desktop.
bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import util.continuations._ | |
class Holder[A] { | |
var value: A = _ | |
def foo(x: => A @suspendable): Unit = | |
reset { value = x } | |
} | |
object Test extends App { | |
val holder = new Holder[Double] | |
holder.foo(1) | |
val a: Double = holder.value //ClassCastExceptionが出る | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment