bug with IJ 7584 EAP + Jet Groovy
I am frustrated by all the problems with the 7.0.1 IJ/Groovy combination (mainly that it doesn't compile groovy most of the time when I hit compile), so I upgraded to 7584.
I had a major prob...
this method in a Groovy class wouldn't compile correctly (it does from the command line tho)
def createInstance(className) {
def clazz = loadClass(className)
return clazz.newInstance()
}
the IJ groovy compiler put a
? in front of the method for the java equiv, as it didn't seem to understand that it should be an "Object"
Please sign in to leave a comment.
Phil,
Are you aware that JetGroovy is not self-contained w.r.t. a Groovy compiler? You have to configure the plug-in to tell it where you have Groovy and (optionally) Grails installed. So if all you did was upgrade IDEA and / or JetGroovy, you're still using the same Groovy compiler you were before.
I don't know if this is related to the symptom you're seeing (probably not likely), but it's something to keep in mind.
By the way, it's always a good idea to mention the version of the JetGroovy plug-in, Groovy, and JDK you're using.
Randall Schulz
Yes, I pointed JetGroovy at the new groovy install (1.1 RC3). I'm on JDK 1.5 and Jet Groovy 0.1.13053
NOTE: I changed the return type to Object and it works... however I shouldn't have to.
Hello Phil,
I fail to reproduce the problem here. The output of the stub compiler for you example is like it is supposed to be:
public class YourScript {
public static final void main(java.lang.String[] args) {
return ;
}
public java.lang.Object run() {
return null;
}
public java.lang.Object createInstance(java.lang.Object className) {
return null;
}
}
Eugene.