Skip to content

Instantly share code, notes, and snippets.

@johnynek
Last active December 10, 2015 20:28
Show Gist options
  • Save johnynek/4488027 to your computer and use it in GitHub Desktop.
Save johnynek/4488027 to your computer and use it in GitHub Desktop.
kryo scala inner-class bug
trait AwesomeFns {
val myfun = { x: Int => 2*x }
}
object BaseFns extends AwesomeFns {
val myfun2 = { x: Int => 4*x }
def apply(x: Int) = myfun.apply(x)
}
// Trying to serialize myfun2 with Kryo fields serializer works, but not myfun.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment