Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361911

Summary: [xbase][refactoring] Element is not renamed after type guard of switch statement
Product: [Modeling] TMF Reporter: Jan Koehnlein <jan>
Component: XtextAssignee: Jan Koehnlein <jan>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sven.efftinge, tmf.xtext-inbox
Version: 2.0.1Flags: jan: juno+
Target Milestone: M4   
Hardware: All   
OS: All   
Whiteboard:

Description Jan Koehnlein CLA 2011-10-25 07:44:54 EDT
Consider the following Xbase expression

{
  val Object v = ""
  switch(v) {
    String: v.length
    Object: v.hashCode
    default: v.hashCode
  }
}

If you rename v in the val statement, only the first two ant the last occurence are renamed.
Comment 1 Jan Koehnlein CLA 2011-11-08 07:07:20 EST
Results of a short discussion: Instead of introducing a new variable with the same name and a different type, we should rather implement the cast inside the type provider.
Comment 2 Jan Koehnlein CLA 2011-11-21 05:59:30 EST
Follow up in bug 364298
Comment 3 Jan Koehnlein CLA 2011-11-21 06:00:16 EST
Sorry for last comment, wrong bug :-)
Comment 4 Jan Koehnlein CLA 2011-11-22 07:01:56 EST
Pushed to master.
Comment 5 Karsten Thoms CLA 2017-09-19 17:23:16 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:34:36 EDT
Closing all bugs that were set to RESOLVED before Neon.0