Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324510 - [compiler] Cannot use "result" as a parameter name in a callin-replace binding
Summary: [compiler] Cannot use "result" as a parameter name in a callin-replace binding
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 0.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.7.1   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-04 07:53 EDT by Stephan Herrmann CLA
Modified: 2010-09-23 12:17 EDT (History)
0 users

See Also:


Attachments
fix (1.65 KB, patch)
2010-09-04 08:13 EDT, Stephan Herrmann CLA
no flags Details | Diff

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