Bug 133351 - [compiler] No effect assignment diagnosis range isn't correct
Summary: [compiler] No effect assignment diagnosis range isn't correct
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-27 09:20 EST by David Audel CLA
Modified: 2006-04-13 10:53 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2006-03-27 09:20:04 EST
(from bug 100369 test case)

build I20060327-0010

------------------------------------------
int length2 = length2 = 0; // first problem

int length3 = 0;
length3 = length3 = 0; // second problem
------------------------------------------

Only the variable name declation has a red squiggle for the first error but all the assigment has a red squggle for the second error.

All the assignment should be underline for the first error.
Comment 1 Olivier Thomann CLA 2006-04-10 11:04:37 EDT
Candidate for RC1?
Comment 2 Philipe Mulet CLA 2006-04-10 11:28:18 EDT
+1 for 3.2RC1, if not harmful to UI.
Comment 3 Olivier Thomann CLA 2006-04-10 12:16:15 EDT
What do you expect to be underlined in the first case ?
"length2 = length2 = 0" or "int length2 = length2 = 0;" ?
Comment 4 David Audel CLA 2006-04-10 12:23:07 EDT
I prefer "length2 = length2 = 0", but i think that both are good.
Comment 5 Olivier Thomann CLA 2006-04-10 15:08:45 EDT
Fixed and released in HEAD.
The ranges are now consistent.

In:
int length2 = length2 = 0; // first problem

it underlines: length2 = length2 = 0

In:
int length3 = 0;
length3 = length3 = 0; // second problem
it underlines: length3 = length3 = 0
Comment 6 Olivier Thomann CLA 2006-04-10 15:11:07 EDT
Added regression test in org.eclipse.jdt.core.tests.compiler.regression.AssignmentTest.test045 and updated existing tests.
All JDT/Core tests passed.
Comment 7 David Audel CLA 2006-04-13 10:53:04 EDT
Verified for 3.2 RC1 using build I20060413-0010