Skip to content

Instantly share code, notes, and snippets.

@einblicker
Created November 7, 2011 22:24
Show Gist options
  • Save einblicker/1346399 to your computer and use it in GitHub Desktop.
Save einblicker/1346399 to your computer and use it in GitHub Desktop.
bug
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