ZAM fixes for assignments involving "any" record fields

This commit is contained in:
Vern Paxson 2024-11-10 17:18:14 -08:00 committed by Arne Welzel
parent c7e5e5feea
commit 197d49773c
4 changed files with 28 additions and 1 deletions

View file

@ -0,0 +1,3 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
[a=123, b=[abc]]
[a=123, b=1]

View file

@ -0,0 +1,16 @@
# @TEST-DOC: Regression test for reassigning an "any" field
# @TEST-EXEC: zeek -b -O ZAM %INPUT >output
# @TEST-EXEC: btest-diff output
type X: record {
a: string;
b: any;
};
event zeek_init()
{
local x = X($a="123", $b=vector("abc"));
print x;
x$b = 1;
print x;
}