Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.4.6
-
None
-
None
Description
When using AST transformations together with joint compilation the generated stubs don't mind the transformations, which may yield invalid classes, that javac will fail to compile.
Example:
[...] class GroovyTest implements Callable { @Delegate private final Callable c = { println "Hello World" } }
will get compiled into the following stub:
[...] public class GroovyTest extends java.lang.Object implements java.util.concurrent.Callable, groovy.lang.GroovyObject { ; public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} public void setMetaClass(groovy.lang.MetaClass mc) { } public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments) { return null;} public java.lang.Object getProperty(java.lang.String property) { return null;} public void setProperty(java.lang.String property, java.lang.Object value) { } }
which claims to implement Callable, but lacks a call method.
I don't know if this is specific to @Delegate, but noticed similar behaviour with @InheritConstructors.
Attachments
Attachments
Issue Links
- relates to
-
GROOVY-3683 groovyc can't joint compile a Java class that uses a delegate method from a Groovy class with an @Delegate property annotation
- Open
-
GROOVY-4647 A class using the @Delegate annotation does not implement the delegate's interfaces from the Java side when join compiling
- Open
-
GROOVY-6864 Stub generation doesn't generate constructors added by @TupleConstructor
- Open
-
GROOVY-6865 @Delegate does not work with generated stubs
- Open
-
GROOVY-8709 Autoclone clone() method not included in Java stub
- Open
-
GROOVY-10584 Stub generator does not respect BaseScript
- Open
-
GROOVY-11088 Missing symbol for package-private member under joint compilation
- Closed