How does JetGroovy compilation work?
Say, we have two classes (in own groovy files):
class A { static final String ABC = 'abc' }
class B { static void main(args) { println A.ABC } }
If I compile manually via 'groovyc' and start with 'java ... B', of course, I get 'abc' console output. If I compile via JetGroovy, I get 'null'.
I have tried to "decorate" 'main' in the java-way (public static...) and run B.class as java application - at this case console output is empty at all.
This is with last JetGroovy version and IDEA v.7 (trial).
请先登录再写评论。
Andrew,
this seems a bug that JetGroovy's compiled stub gets into classpath. This should not happen. Do you have it on first compilation, or subsequent ones?
Eugene.
It takes place even after manually cleaning of output folder and rebuilding the whole project.
BTW, another problem is when one groovy class implements other groovy class - at compilation I get an error 'Cannot find symbol class MuIface' against
.IntelliJIdea70/system/compiler/Xgs.Xgsbe7abbd5/.generated/Groovy_to_java_source_code_generator/Xgs.be7abb72/production/...IfaceImplenetor.java
Well, I checked the issue, and it seems a bug in idea core. I will discuss it with knowledgeable people tomorrow.
Eugene.
see IDEADEV-22878