btest for mutually-recursive case

This commit is contained in:
Vern Paxson 2022-04-29 08:44:58 -07:00
parent 5a1c33ed4a
commit b670046a69
2 changed files with 27 additions and 0 deletions

View file

@ -47,3 +47,7 @@ s3, 8
s3, 20
s4, 3
s4, 9
1
3
1
3

View file

@ -15,6 +15,18 @@ type r2: record {
d: string &optional;
};
# For testing mutually recursive records.
type X: record {
};
type Y: record {
x: X;
};
redef record X += {
y: Y &optional;
};
event zeek_init()
{
print "bool", value_footprint(T, F);
@ -100,4 +112,15 @@ event zeek_init()
local s4 = set(vector(l1b), vector(l1b), vector(l1b));
print "s4", value_footprint(s4, F);
print "s4", value_footprint(s4, T);
local x: X;
local y: Y;
x$y = y;
y$x = x;
print value_footprint(x, F);
print value_footprint(x, T);
print value_footprint(y, F);
print value_footprint(y, T);
}