Changing class hierarchies of compiled against classes.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Changing class hierarchies of compiled against classes.

ld@ldaley.com
Hi,

I'm trying to change the parent class of a class that another class is compiled against, and am having some problems that I don't quite understand.

I have Java classes A ← B ← C that are compiled together into a library at version 1. A downstream project at version 1 has Groovy class D that extends C.

When I build a new version of the library where B is no longer in the hierarchy (i.e. A ← C) and try to use it with the downstream project without rebuilding it I get an error like:

java.lang.VerifyError: (class: D, method: super$4$«some method from B» signature: (L«types»;)V) Illegal use of nonvirtual function call

when trying to load D. D is not using the method that is being complained about at all. I also tried add the methods that are being complained about to A but this did not fix the problem.


Is Groovy embedding information in D's class file that maps particular methods to particular super classes? That's the only thing I can think of.  If D is written in Java instead of Groovy, everything is fine. So the question is; is there any way to make this work? If not, is this on the radar to be fixed for Groovy 2?
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...