Summary: | [compiler] different behavior than javac on definite assignment analysis involving infinite loop | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Maxime Daniel <maxime_daniel> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | VERIFIED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.4 | ||
Target Milestone: | 3.4 RC4 | ||
Hardware: | PC | ||
OS: | All | ||
Whiteboard: |
Description
Maxime Daniel
2008-06-04 03:57:31 EDT
Following JL3 §16, i is definitely unassigned before the second assignment iff it is so after true when false and before the only break that branches to the for statement. I believe that both conditions hold true, giving us right and javac wrong. Closing as INVALID. Added AssignmentTest#56 and 57. Agreed that 'i' is definitely unassigned in this case reading the following rule in chapter JLS3 §16.2.12: . V is [un]assigned after a for statement iff both of the following are true: + Either a condition expression is not present or V is [un]assigned after the condition expression when false. + V is [un]assigned before every break statement for which the for statement is the break target. |