mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
GH-734: Improve handling of lambdas that escape enclosing frame
This commit is contained in:
parent
fd8db24daf
commit
eb826bd337
5 changed files with 62 additions and 0 deletions
12
testing/btest/language/lambda-zeek-init.zeek
Normal file
12
testing/btest/language/lambda-zeek-init.zeek
Normal file
|
@ -0,0 +1,12 @@
|
|||
# @TEST-EXEC: zeek -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
event zeek_init() &priority=+10
|
||||
{
|
||||
local outer = 101;
|
||||
|
||||
local lambda = function()
|
||||
{ print outer + 2; };
|
||||
|
||||
lambda();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue