mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

Parameters relied on is_record for a couple of validations, but they are not records and should not be treated as such. This way we can validate &optional better.
12 lines
276 B
Text
12 lines
276 B
Text
# @TEST-EXEC-FAIL: zeek -b %INPUT >out 2>&1
|
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out
|
|
|
|
# Invalid on globals
|
|
global a: int &optional;
|
|
|
|
# Invalid on parameters
|
|
function f(a: int &optional)
|
|
{
|
|
# Invalid in locals
|
|
local b: int &optional;
|
|
}
|