mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/vern/any-typetype-when-fix'
- Minor whitespace adjutment in merge * origin/topic/vern/any-typetype-when-fix: bug fixes for using "when" in functions that have a local of type "any"
This commit is contained in:
commit
b776f17cea
5 changed files with 32 additions and 2 deletions
1
testing/btest/Baseline/language.any-when/out
Normal file
1
testing/btest/Baseline/language.any-when/out
Normal file
|
@ -0,0 +1 @@
|
|||
9
|
19
testing/btest/language/any-when.zeek
Normal file
19
testing/btest/language/any-when.zeek
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @TEST-EXEC: zeek -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
type c: count;
|
||||
function foo(): count
|
||||
{
|
||||
local bar: any;
|
||||
bar = c;
|
||||
return when ( 5 > 3 )
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
}
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
when ( local b = foo() )
|
||||
print b;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue