Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 545497 - [12] AST Rewrite ignores the optional expression if implicit
Summary: [12] AST Rewrite ignores the optional expression if implicit
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.10   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: BETA J12   Edit
Assignee: Sarika Sinha CLA
QA Contact: Manoj N Palat CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 539080 544748
  Show dependency tree
 
Reported: 2019-03-18 11:33 EDT by Jay Arthanareeswaran CLA
Modified: 2019-03-19 06:16 EDT (History)
2 users (show)

See Also:
manoj.palat: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jay Arthanareeswaran CLA 2019-03-18 11:33:41 EDT
The test added (now commented out) in the following gerrit fails due to the rewrite ignoring the optional expression if the break statement is implicit.

https://git.eclipse.org/r/#/c/138923/

The code in the NaiveASTFlattener#visit(BreakStatement) that returns if isImplicit looks wrong to me. I think we should at the very least, look for the expression and include in the result.
Comment 1 Manoj N Palat CLA 2019-03-18 18:43:53 EDT
@Sarika: Can you please take a look?
Comment 2 Eclipse Genie CLA 2019-03-19 00:20:04 EDT
New Gerrit change created: https://git.eclipse.org/r/138982