Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 416559 - [1.8][dom ast] variable binding for LambdaExpression parameter has non-unique key
Summary: [1.8][dom ast] variable binding for LambdaExpression parameter has non-unique...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: BETA J8   Edit
Assignee: shankha banerjee CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 408940
  Show dependency tree
 
Reported: 2013-09-04 14:07 EDT by Markus Keller CLA
Modified: 2014-01-06 23:13 EST (History)
6 users (show)

See Also:
jarthana: review+


Attachments
Patch (3.58 KB, patch)
2013-12-24 01:31 EST, shankha banerjee CLA
no flags Details | Diff
Patch (6.30 KB, patch)
2014-01-06 08:39 EST, shankha banerjee CLA
shankhba: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2013-09-04 14:07:33 EDT
The IVariableBinding for a LambdaExpression parameter has a non-unique key:

    IntPredicate f = (i) -> i == 1;
    IntPredicate g = (i) -> i != 2;

Key for both variables 'i' is just '#i'. Should be prefixed with the LambdaExpression's method binding key.
Comment 1 shankha banerjee CLA 2013-12-20 07:16:19 EST
Working on it.
Comment 2 shankha banerjee CLA 2013-12-24 01:31:39 EST
Created attachment 238549 [details]
Patch

Patch with test case.
Test results are green.
Please review.
Comment 3 Jay Arthanareeswaran CLA 2014-01-06 04:55:55 EST
Patch is good. Just one small suggestion in the new test - can you use the testcase from comment #0 and add a test to confirm the keys are not equal for the two keys? Also, please adjust the copyright to 2014. Thanks!
Comment 4 shankha banerjee CLA 2014-01-06 08:39:58 EST
Created attachment 238688 [details]
Patch

Copyright has been updated to 2014.
Added a new test case (Comment 0).
Comment 5 shankha banerjee CLA 2014-01-06 08:42:07 EST
I agree to the terms and conditions on http://www.eclipse.org/legal/CoO.php.