Bug 98165 - Wrong source range for ConditionalExpression with casted target in FieldAccess as expression
Summary: Wrong source range for ConditionalExpression with casted target in FieldAcces...
Status: CLOSED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.1 RC2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-02 15:34 EDT by Markus Keller CLA
Modified: 2005-06-10 10:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2005-06-02 15:34:21 EDT
N20050602-0010

Code extract from MethodLocator:

declarationsLevel = ((InternalSearchPattern)this.pattern).mustResolve ?
POSSIBLE_MATCH : ACCURATE_MATCH;

The ConditionalExpression has a wrong source range:
    'mustResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;'

Expected: whole right hand side
Comment 1 Olivier Thomann CLA 2005-06-02 15:45:18 EDT
I will investigate.
Comment 2 Olivier Thomann CLA 2005-06-02 16:11:58 EDT
Reproduced.
Comment 3 Philipe Mulet CLA 2005-06-02 16:20:54 EDT
+1 for RC2
Comment 4 Olivier Thomann CLA 2005-06-02 20:58:05 EDT
Fixed and released in HEAD.
The source start of a field reference was updated only of the receiver was this.
Change made in the Parser.
All tests have been updated.
Regression test in org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2.test0611.
Comment 5 Frederic Fusier CLA 2005-06-07 12:03:04 EDT
Verified for 3.1 RC2 using build N20050607-0010 + JDT/Core HEAD
Comment 6 David Audel CLA 2005-06-10 10:12:11 EDT
Verified for 3.1 RC2 using build I20050610-0010