Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.5.7, 1.6-beta-2
-
Fix Version/s: 1.6-rc-1, 1.5.8, 1.7-beta-1
-
Component/s: Compiler
-
Labels:None
-
Environment:All
-
Number of attachments :
Description
Given the following code:
for(;;) {
}
groovyc generates the following bytecode:
114: bipush 0
116: ifeq 122
119: goto 114
Unfortunately, that bipush 0/ifeq means that this loop always exits immediately, unlike javac, which treats that identically to while(true) {}