mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
ZAM fixes for assignments involving "any" record fields
This commit is contained in:
parent
c7e5e5feea
commit
197d49773c
4 changed files with 28 additions and 1 deletions
3
testing/btest/Baseline/opt.regress-any/output
Normal file
3
testing/btest/Baseline/opt.regress-any/output
Normal 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]
|
16
testing/btest/opt/regress-any.zeek
Normal file
16
testing/btest/opt/regress-any.zeek
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue