Summary: | [DOM] Wrong infix expression when '-' is used within string literals | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> | ||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | philippe_mulet | ||||||
Version: | 3.2 | ||||||||
Target Milestone: | 3.2 M2 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Olivier Thomann
2005-09-14 15:18:14 EDT
Using latest, the following code doesn't produce the right tree. public class X { String f = "" + "" - 1; } "" + "" - 1 produces a unique infix expression with operator '-' and an extended operands (1). This is wrong. It should be two infix expressions. It works fine if only number literals are used. Fix for this one is needed for the work on the code formatter. Fixed and released in HEAD. Regression test added in org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2.test0618. Created attachment 27145 [details]
Proposed fix
Created attachment 27146 [details]
Regression test
Philippe, candidate for 3.1.1? Verified for 3.2 M2 on build Build id: I20050920-0010. |