Details
Description
Instance initialization blocks within a GroovyTestCase are not being compiled when the test case is part of the groovy build. This happens from Ant but not from the IDE or outside the groovy Ant Build.
The attached test case (in patch) will execute and pass in the IDE but fails as part of the ant build. To invoke it do:
ant test -DtestCase=groovy.InitailizationBlockTest
Looking at the javap output for the compiled class, the instance initialization block seems to be totally missing.
I have no idea where to starting looking into this. Sorry.
Activity
Guillaume Laforge
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 1.7-beta-1 [ 14014 ] |
Guillaume Laforge
made changes -
| Fix Version/s | 1.7-beta-1 [ 14014 ] | |
| Fix Version/s | 1.7-beta-x [ 15538 ] |
blackdrag blackdrag
made changes -
| Fix Version/s | 1.8.x [ 15750 ] | |
| Fix Version/s | 2.x [ 17013 ] | |
| Fix Version/s | 1.7.x [ 15538 ] |
Just confirming this still occurs in trunk. From ant the instance field is null and the test fails. In the GroovyConsole it passes.