mirror of
https://github.com/zeek/zeek.git
synced 2025-10-01 22:28:20 +00:00
tightened up parsing of $field=X record constructor expressions
This commit is contained in:
parent
d20550f553
commit
36862a18d6
4 changed files with 51 additions and 22 deletions
2
testing/btest/Baseline/language.bogus-field-assign/out
Normal file
2
testing/btest/Baseline/language.bogus-field-assign/out
Normal file
|
@ -0,0 +1,2 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
error in <...>/bogus-field-assign.zeek, line 6: syntax error, at or near "$"
|
|
@ -1,2 +1,2 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
error in <...>/record-bad-ctor3.zeek, line 13: bad type in record constructor ([$x=a + 5, a + 9] and a + 9)
|
||||
error in <...>/record-bad-ctor3.zeek, line 13: syntax error, at or near "a"
|
||||
|
|
6
testing/btest/language/bogus-field-assign.zeek
Normal file
6
testing/btest/language/bogus-field-assign.zeek
Normal file
|
@ -0,0 +1,6 @@
|
|||
# @TEST-EXEC-FAIL: zeek -b %INPUT >out 2>&1
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out
|
||||
|
||||
# Zeek used to happily print the value of "5" here.
|
||||
|
||||
print $foo=5;
|
Loading…
Add table
Add a link
Reference in a new issue