Community
Participate
Working Groups
Build Identifier: Studio 7.2 based on Eclipse 3.6 Anonymous function inside a class method breaks current scope. Everything that comes after the lambda function declaration becomes belonging to the outer scope, which is a class in this case. This issue can be seen in an Outline view. Reproducible: Always
Created attachment 173542 [details] Test for reproduction Use this for test/reproduction. Local variables $before and $after should not be displayed in Outline.
Created attachment 173547 [details] Patch file.
Fixed. The patch is attached.
Created attachment 173548 [details] Unitest for the bug
Hi Kirill Thanks for you patch!! I have not noticed you also fixed this bug,I am trying to fix this too:) After apply your patch: class A { public function Foo() { $before = 0; $add = function ($x) { return ($| + 1);//$x is not shown here when call CA }; $after = 0; } } And I will attach my patch,and I am not sure if my patch will cause other problem:)
Created attachment 173564 [details] patch my patch
*** Bug 319921 has been marked as a duplicate of this bug. ***
Tested on 2.2.1.v20100829 Fixed