Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361911 - [xbase][refactoring] Element is not renamed after type guard of switch statement
Summary: [xbase][refactoring] Element is not renamed after type guard of switch statement
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: M4   Edit
Assignee: Jan Koehnlein CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-25 07:44 EDT by Jan Koehnlein CLA
Modified: 2017-09-19 17:34 EDT (History)
2 users (show)

See Also:
jan: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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