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

Bug 341753

Summary: [Xbase] Cannot use parameter name / local var name 'this'
Product: [Modeling] TMF Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: sven.efftinge
Version: 2.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on:    
Bug Blocks: 342032    

Description Sebastian Zarnekow CLA 2011-04-04 05:38:45 EDT
We should introduce XAbstractFeatureCall#implicitFirstArgument in addition to the #implicitReceiver and update the FeatureCall2JavaMapping. This will allow overloaded 'this' and 

class Thing {
	@Inject extension ThingExt
	foo() {	bar() }
}

class ThingExt {
	bar(Thing t) {}
}
Comment 1 Sven Efftinge CLA 2011-04-19 07:51:12 EDT
We decided to not do this, as it would make feature resolution even more complicated.
We couldn't oversee all problems and wanted to be able to learn in real-world projects whether this is 
worth the added complexity.

Making it an enhancement and removing the scheduling flags.
Comment 2 Sven Efftinge CLA 2011-05-15 10:32:31 EDT
I close this for now, as we agreed on not supporting variable name shadowing. If it at some point it is important enough to reconsider it shouldn't be a problem to add a new feature request.