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

Bug 324510

Summary: [compiler] Cannot use "result" as a parameter name in a callin-replace binding
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTJAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.7   
Target Milestone: 0.7.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
fix none

Description Stephan Herrmann CLA 2010-09-04 07:53:41 EDT
In a callin-replace binding, using "result" as a parameter name causes
a compile error "duplicate local variable result".
Witness is the new test test411_beforeCallinBinding1().

In situations where "result" is a special identifier (parameter mappings,
predicate of an after callin), "result" cannot be used as a parameter
name, however, if no parameter mappings etc. are present, we should
allow the use of "result".
Comment 1 Stephan Herrmann CLA 2010-09-04 08:13:40 EDT
Created attachment 178211 [details]
fix

Fixed by using the internal name "_OT$result" for the internal variable
to avoid conflict with any user provided names.
Comment 2 Stephan Herrmann CLA 2010-09-04 08:14:45 EDT
Patch has been committed as r757.
Comment 3 Stephan Herrmann CLA 2010-09-23 12:17:23 EDT
Verified using I201009211735