Bug 65503

Summary: [1.5] "new" for-loop inside "old" for-loop gives error
Product: [Eclipse Project] JDT Reporter: Michael Mutschler <michael>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Michael Mutschler CLA 2004-06-03 05:12:21 EDT
using a new-style for-loop inside a "classic" for loop, produces the following 
error:
"Type mismatch: cannot convert from int to boolean"

here is a code-sample:
    public void bug(List<String> lines) {
        for (int i=0; i<10; i++) {  // here the "i++" is marked bad
            for (String test: lines) {
                System.out.println(test);
            }
        }
    }

PS: using ecplise3.0RC1 & cheetah V0.05
Comment 1 Philipe Mulet CLA 2004-06-17 12:50:08 EDT
Error is due to invalid parse. Outer for statement got parsed into:
   for (int i = 0;; (i ++); )    
Comment 2 Olivier Thomann CLA 2004-06-17 15:15:16 EDT
Fixed and released in stream 1.5.
Regression test added.