16 Jun 2012 20:09
[groovy-dev] Potential Method Overloading bug in Groovy 2
Hey all,
I'm sorry if I'm doing the wrong thing by reporting the bug on this
list rather than the bug tracker, but I only saw a milestone for rc-4,
and this seems to be a bug on rc-3, which is the latest version linked
from the website. I think I've identified a bug in the static
compilation backend. If run the following program, I get a failure
during verification:
import static org.junit.Assert.*;
import groovy.transform.CompileStatic;
<at> CompileStatic
class CompilerBugs {
public static void main(String[] args) {
int expected = 0
assertEquals(expected, args.length)
}
}
If I remove the <at> CompileStatic then the program executes fine. The
specific error message is : "(class: CompilerBugs, method: main
signature: ([Ljava/lang/String;)V) Expecting to find object/array on
stack". The bytecode that gets produced for the main method is:
public static void main(java.lang.String[]);
Code:
0: iconst_0
(Continue reading)
RSS Feed