mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
Merge remote-tracking branch 'origin/topic/johanna/function-recursion' into topic/johanna/netcontrol
This commit is contained in:
commit
eb0692106a
6 changed files with 69 additions and 6 deletions
|
@ -0,0 +1,2 @@
|
|||
[id=<uninitialized>, inner=<uninitialized>]
|
||||
record { id:count; inner:record { create:function(input:<recursion>;) : string; }; }
|
20
testing/btest/language/record-function-recursion.bro
Normal file
20
testing/btest/language/record-function-recursion.bro
Normal file
|
@ -0,0 +1,20 @@
|
|||
# @TEST-EXEC: bro -b %INPUT 2>&1 >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
type Outer: record {
|
||||
id: count &optional;
|
||||
};
|
||||
|
||||
type Inner: record {
|
||||
create: function(input: Outer) : string;
|
||||
};
|
||||
|
||||
redef record Outer += {
|
||||
inner: Inner &optional;
|
||||
};
|
||||
|
||||
event bro_init() {
|
||||
local o = Outer();
|
||||
print o;
|
||||
print type_name(o);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue