mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
GH-725: fix logic for finding a lambda's usage of outer IDs
This commit is contained in:
parent
f032885085
commit
1ca11f11c7
6 changed files with 43 additions and 22 deletions
19
testing/btest/language/lambda-nested-copy.zeek
Normal file
19
testing/btest/language/lambda-nested-copy.zeek
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @TEST-EXEC: zeek -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
local outer = 100;
|
||||
|
||||
local lambda = function()
|
||||
{
|
||||
local inner = function(a: count, b: count, c: count, d: count, e: count, f: count)
|
||||
{
|
||||
print outer + f;
|
||||
};
|
||||
|
||||
inner(1, 2, 3, 4, 5, 6);
|
||||
};
|
||||
|
||||
lambda();
|
||||
|
||||
local copyLambda = copy(copy(copy(lambda)));
|
||||
copyLambda();
|
Loading…
Add table
Add a link
Reference in a new issue