scala jrebel superclass change

Posted by coubeatczech on Stack Overflow See other posts from Stack Overflow or by coubeatczech
Published on 2010-12-28T23:48:35Z Indexed on 2010/12/28 23:54 UTC
Read the original article Hit count: 224

Filed under:
|

hi, I'm using JRebel with Scala and I'm quite frequently experiencing the need for restart of server due to the fact that JRebel is unable to load a class if the superclass was changed. This is done mainly when I change anonymous functions as I can deduce from the JRebel error desription:
Class 'mypackage.NewBook$$anonfun$2' superclass was changed from 'scala.runtime.AbstractFunction1' to 'scala.runtime.AbstractFunction2' and could not be reloaded.
Is there any way, how can I design my code to avoid this? Does scala compiler take the functions, numbers them from one as they appear in source code?

© Stack Overflow or respective owner

Related posts about scala

Related posts about compiler