Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355843 - [xbase] Closure parameters clashing with outer context
Summary: [xbase] Closure parameters clashing with outer context
Status: CLOSED WONTFIX
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-25 10:16 EDT by Daniel Simoes CLA
Modified: 2011-10-17 16:42 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Simoes CLA 2011-08-25 10:16:52 EDT
Build Identifier: I20110613-1736

Trying this in PureXBase:

val a = 5
val (int, int)=>int sum = [a, b | a + b]

results in the following error: "Duplicate variable name 'a'".

Is it a feature? Isn't the parameter supposed to shadow the outer 'val'?

Thanks.


Reproducible: Always

Steps to Reproduce:
PureXBase:

val a = 5
val (int, int)=>int sum = [a, b | a + b]
Comment 1 Sebastian Zarnekow CLA 2011-09-29 10:45:45 EDT
Xbase does not support variable shadowing for now. It is explicitly validated that you use unique variable names.
Comment 2 Sebastian Zarnekow CLA 2011-10-17 16:42:23 EDT
See last comment. We don't have concrete plans to change the semantics.