| Summary: | [Xtend] Add error check for variable name shadowing | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Sven Efftinge <sven.efftinge> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | Flags: | sven.efftinge:
indigo+
|
| Version: | 2.0.0 | ||
| Target Milestone: | M7 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
We've decided to not support the shadowing of 'this', which turned out to be the only sensible use-case for variable shadowing. So we should disallow variable name shadowing alltogether. pushed to master Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
Xtend supports shadowing of variable names. This is useful and convenient in some situations. Mostly i the case, where you want to rebind 'this' in order to access properties of that variable in a convenient way. toJava(Entity this) ''' <<packageName>> public class <<name>> { } ''' However the following is also possible but is usually unwanted: foo(String foo) { val foo = 'other' }