From 8109bbc52f6ac53248e446186fb1728b799aa8d7 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Wed, 4 Oct 2023 16:33:22 +0200 Subject: [PATCH] Var/Func: Render function parameters using comma, not semicolon A bit larger follow-up to what Tim pointed out: Function prototype descriptions previously used semicolons to separate parameters. Switch to use commas when a RecordType is used as function parameter. Use existing "func_args" naming for consistency. --- src/Type.cc | 14 ++++++++++---- src/Type.h | 2 +- src/Var.cc | 2 +- testing/btest/Baseline/bifs.type_name/out | 2 +- .../out | 4 ++-- .../language.alternate-event-hook-prototypes/out | 2 +- .../errors | 2 +- .../hidden-error | 4 ++-- .../out | 4 ++-- .../btest/Baseline/language.at-if-lambda-2/.stdout | 2 +- .../btest/Baseline/language.at-if-lambda-3/.stdout | 2 +- .../btest/Baseline/language.at-if-lambda-4/.stdout | 2 +- .../btest/Baseline/language.at-if-lambda/.stdout | 2 +- .../language.expire-func-type-check/output | 2 +- .../out | 3 +++ .../out | 3 +++ .../out | 2 +- .../out | 3 +-- .../out | 3 +-- .../out | 12 ++++++------ .../Baseline/signatures.bad-eval-condition/.stderr | 2 +- .../redeclaration-redefinition-errors.zeek | 8 ++++++++ 22 files changed, 50 insertions(+), 32 deletions(-) create mode 100644 testing/btest/Baseline/language.redeclaration-redefinition-errors-10/out create mode 100644 testing/btest/Baseline/language.redeclaration-redefinition-errors-11/out diff --git a/src/Type.cc b/src/Type.cc index 4d638901d9..1403fe972f 100644 --- a/src/Type.cc +++ b/src/Type.cc @@ -835,7 +835,7 @@ void FuncType::DoDescribe(ODesc* d) const { d->Add(FlavorString()); d->Add("("); - args->DescribeFields(d); + args->DescribeFields(d, true); d->Add(")"); if ( yield ) @@ -849,7 +849,7 @@ void FuncType::DoDescribe(ODesc* d) const d->Add(int(Tag())); d->Add(flavor); d->Add(yield != nullptr); - args->DescribeFields(d); + args->DescribeFields(d, true); if ( yield ) yield->Describe(d); } @@ -1477,7 +1477,7 @@ void RecordType::AddFieldsDirectly(const type_decl_list& others, bool add_log_at num_fields = types->length(); } -void RecordType::DescribeFields(ODesc* d) const +void RecordType::DescribeFields(ODesc* d, bool func_args) const { if ( d->IsReadable() ) { @@ -1501,7 +1501,13 @@ void RecordType::DescribeFields(ODesc* d) const td->attrs->Describe(d); } - d->Add(";"); + if ( func_args ) + { + if ( i + 1 < num_fields ) + d->Add(","); + } + else + d->Add(";"); } } diff --git a/src/Type.h b/src/Type.h index 8583b21ad1..ffe0eb30c8 100644 --- a/src/Type.h +++ b/src/Type.h @@ -718,7 +718,7 @@ public: void AddFieldsDirectly(const type_decl_list& types, bool add_log_attr = false); void DescribeReST(ODesc* d, bool roles_only = false) const override; - void DescribeFields(ODesc* d) const; + void DescribeFields(ODesc* d, bool func_args = false) const; void DescribeFieldsReST(ODesc* d, bool func_args) const; bool IsFieldDeprecated(int field) const diff --git a/src/Var.cc b/src/Var.cc index 7f2b748261..c7b404f27b 100644 --- a/src/Var.cc +++ b/src/Var.cc @@ -57,7 +57,7 @@ static bool add_prototype(const IDPtr& id, Type* t, std::vector* attrs) if ( auto p = canon_ft->FindPrototype(*alt_args); p ) { - alt_ft->Error("alternate function prototype already exists", p->args.get()); + alt_ft->Error("alternate function prototype already exists", p->args.get(), true); return false; } diff --git a/testing/btest/Baseline/bifs.type_name/out b/testing/btest/Baseline/bifs.type_name/out index c9643aef4d..385013e4d1 100644 --- a/testing/btest/Baseline/bifs.type_name/out +++ b/testing/btest/Baseline/bifs.type_name/out @@ -20,7 +20,7 @@ set[port,string] table[count] of string table[string] of table[addr,port] of string record { c:count; s:string; } -function(aa:int; bb:int;) : bool +function(aa:int, bb:int) : bool function() : any function() : void file of string diff --git a/testing/btest/Baseline/language.alternate-event-hook-prototypes-invalid-arg/out b/testing/btest/Baseline/language.alternate-event-hook-prototypes-invalid-arg/out index 79a01b6834..0bd00a72ef 100644 --- a/testing/btest/Baseline/language.alternate-event-hook-prototypes-invalid-arg/out +++ b/testing/btest/Baseline/language.alternate-event-hook-prototypes-invalid-arg/out @@ -1,3 +1,3 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. -error in <...>/alternate-event-hook-prototypes-invalid-arg.zeek, line 5 and <...>/alternate-event-hook-prototypes-invalid-arg.zeek, line 4: alternate function prototype arg 'nope' not found in canonical prototype (event(nope:string; cantdothis:count;) and event(s:string; c:count;)) -error in <...>/alternate-event-hook-prototypes-invalid-arg.zeek, line 8 and <...>/alternate-event-hook-prototypes-invalid-arg.zeek, line 7: alternate function prototype arg 'andnotthiseither' not found in canonical prototype (hook(andnotthiseither:addr;) : bool and hook(s:string; c:count;) : bool) +error in <...>/alternate-event-hook-prototypes-invalid-arg.zeek, line 5 and <...>/alternate-event-hook-prototypes-invalid-arg.zeek, line 4: alternate function prototype arg 'nope' not found in canonical prototype (event(nope:string, cantdothis:count) and event(s:string, c:count)) +error in <...>/alternate-event-hook-prototypes-invalid-arg.zeek, line 8 and <...>/alternate-event-hook-prototypes-invalid-arg.zeek, line 7: alternate function prototype arg 'andnotthiseither' not found in canonical prototype (hook(andnotthiseither:addr) : bool and hook(s:string, c:count) : bool) diff --git a/testing/btest/Baseline/language.alternate-event-hook-prototypes/out b/testing/btest/Baseline/language.alternate-event-hook-prototypes/out index b74570e1aa..1c341baaff 100644 --- a/testing/btest/Baseline/language.alternate-event-hook-prototypes/out +++ b/testing/btest/Baseline/language.alternate-event-hook-prototypes/out @@ -1,5 +1,5 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. -warning in <...>/alternate-event-hook-prototypes.zeek, line 68 and <...>/alternate-event-hook-prototypes.zeek, line 13: use of deprecated 'my_hook' prototype (hook(c:count;) : bool) +warning in <...>/alternate-event-hook-prototypes.zeek, line 68 and <...>/alternate-event-hook-prototypes.zeek, line 13: use of deprecated 'my_hook' prototype (hook(c:count) : bool) my_hook, infinite, 13 my_hook, 13, infinite my_hook, infinite diff --git a/testing/btest/Baseline/language.alternate-prototypes-default-args/errors b/testing/btest/Baseline/language.alternate-prototypes-default-args/errors index a4ebed301e..31d5541caf 100644 --- a/testing/btest/Baseline/language.alternate-prototypes-default-args/errors +++ b/testing/btest/Baseline/language.alternate-prototypes-default-args/errors @@ -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 ./bad.zeek, line 2 and ./bad.zeek, line 1: alternate function prototype arguments may not have attributes: arg 'a' (event(c:string; b:string; a:string &default=A, &optional;) and event(a:string; b:string; c:string &default=C, &optional;)) +error in ./bad.zeek, line 2 and ./bad.zeek, line 1: alternate function prototype arguments may not have attributes: arg 'a' (event(c:string, b:string, a:string &default=A, &optional) and event(a:string, b:string, c:string &default=C, &optional)) diff --git a/testing/btest/Baseline/language.alternate-prototypes-deprecated-args/hidden-error b/testing/btest/Baseline/language.alternate-prototypes-deprecated-args/hidden-error index 52dbc0db50..4125d1a054 100644 --- a/testing/btest/Baseline/language.alternate-prototypes-deprecated-args/hidden-error +++ b/testing/btest/Baseline/language.alternate-prototypes-deprecated-args/hidden-error @@ -1,4 +1,4 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. -warning in <...>/alternate-prototypes-deprecated-args.zeek, line 11 and <...>/alternate-prototypes-deprecated-args.zeek, line 7: use of deprecated parameter 'b': Don't use 'b' (event(a:string; b:string; c:string;)) -warning in <...>/alternate-prototypes-deprecated-args.zeek, line 30 and <...>/alternate-prototypes-deprecated-args.zeek, line 9: use of deprecated 'myev' prototype: Don't use this prototype (event(a:string; b:string;)) +warning in <...>/alternate-prototypes-deprecated-args.zeek, line 11 and <...>/alternate-prototypes-deprecated-args.zeek, line 7: use of deprecated parameter 'b': Don't use 'b' (event(a:string, b:string, c:string)) +warning in <...>/alternate-prototypes-deprecated-args.zeek, line 30 and <...>/alternate-prototypes-deprecated-args.zeek, line 9: use of deprecated 'myev' prototype: Don't use this prototype (event(a:string, b:string)) error in ./hide.zeek, line 5: unknown identifier b, at or near "b" diff --git a/testing/btest/Baseline/language.alternate-prototypes-deprecated-args/out b/testing/btest/Baseline/language.alternate-prototypes-deprecated-args/out index 0f2f1fdb1d..78c07b78d2 100644 --- a/testing/btest/Baseline/language.alternate-prototypes-deprecated-args/out +++ b/testing/btest/Baseline/language.alternate-prototypes-deprecated-args/out @@ -1,6 +1,6 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. -warning in <...>/alternate-prototypes-deprecated-args.zeek, line 11 and <...>/alternate-prototypes-deprecated-args.zeek, line 7: use of deprecated parameter 'b': Don't use 'b' (event(a:string; b:string; c:string;)) -warning in <...>/alternate-prototypes-deprecated-args.zeek, line 30 and <...>/alternate-prototypes-deprecated-args.zeek, line 9: use of deprecated 'myev' prototype: Don't use this prototype (event(a:string; b:string;)) +warning in <...>/alternate-prototypes-deprecated-args.zeek, line 11 and <...>/alternate-prototypes-deprecated-args.zeek, line 7: use of deprecated parameter 'b': Don't use 'b' (event(a:string, b:string, c:string)) +warning in <...>/alternate-prototypes-deprecated-args.zeek, line 30 and <...>/alternate-prototypes-deprecated-args.zeek, line 9: use of deprecated 'myev' prototype: Don't use this prototype (event(a:string, b:string)) myev (canon), one, two, three myev (new), one, three, [1, 2, 3] myev (new), one, three, 0 diff --git a/testing/btest/Baseline/language.at-if-lambda-2/.stdout b/testing/btest/Baseline/language.at-if-lambda-2/.stdout index a31f53178b..28ad6abfa9 100644 --- a/testing/btest/Baseline/language.at-if-lambda-2/.stdout +++ b/testing/btest/Baseline/language.at-if-lambda-2/.stdout @@ -1,3 +1,3 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. cookie -function(pass_name:string;) : function(ts:time;) : time, function(ts:time;) : time, time, 1660671192.0 +function(pass_name:string) : function(ts:time) : time, function(ts:time) : time, time, 1660671192.0 diff --git a/testing/btest/Baseline/language.at-if-lambda-3/.stdout b/testing/btest/Baseline/language.at-if-lambda-3/.stdout index ffaa797abd..647752631a 100644 --- a/testing/btest/Baseline/language.at-if-lambda-3/.stdout +++ b/testing/btest/Baseline/language.at-if-lambda-3/.stdout @@ -1,2 +1,2 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. -function(ts_str:string;) : time, time, 1660671192.0 +function(ts_str:string) : time, time, 1660671192.0 diff --git a/testing/btest/Baseline/language.at-if-lambda-4/.stdout b/testing/btest/Baseline/language.at-if-lambda-4/.stdout index be41f62a05..6d0a2d7152 100644 --- a/testing/btest/Baseline/language.at-if-lambda-4/.stdout +++ b/testing/btest/Baseline/language.at-if-lambda-4/.stdout @@ -1,2 +1,2 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. -function(ts_str:string; offset:count &default=10, &optional;) : time, time, 1660671202.0 +function(ts_str:string, offset:count &default=10, &optional) : time, time, 1660671202.0 diff --git a/testing/btest/Baseline/language.at-if-lambda/.stdout b/testing/btest/Baseline/language.at-if-lambda/.stdout index a31f53178b..28ad6abfa9 100644 --- a/testing/btest/Baseline/language.at-if-lambda/.stdout +++ b/testing/btest/Baseline/language.at-if-lambda/.stdout @@ -1,3 +1,3 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. cookie -function(pass_name:string;) : function(ts:time;) : time, function(ts:time;) : time, time, 1660671192.0 +function(pass_name:string) : function(ts:time) : time, function(ts:time) : time, time, 1660671192.0 diff --git a/testing/btest/Baseline/language.expire-func-type-check/output b/testing/btest/Baseline/language.expire-func-type-check/output index 091ce43451..c8e749217e 100644 --- a/testing/btest/Baseline/language.expire-func-type-check/output +++ b/testing/btest/Baseline/language.expire-func-type-check/output @@ -2,7 +2,7 @@ warning in <...>/expire-func-type-check.zeek, line 16: Wrong number of arguments for function. Expected 2, got 0. (function() : interval) error in <...>/expire-func-type-check.zeek, line 38: &expire_func argument type clash (&expire_func=invalid_expire_func_no_params) error in <...>/expire-func-type-check.zeek, line 39: &expire_func must yield a value of type interval (&expire_func=invalid_expire_func_no_return) -warning in <...>/expire-func-type-check.zeek, line 22: Wrong number of arguments for function. Expected 3, got 2. (function(t:table[addr,port] of set[addr]; s:set[addr,port];) : interval) +warning in <...>/expire-func-type-check.zeek, line 22: Wrong number of arguments for function. Expected 3, got 2. (function(t:table[addr,port] of set[addr], s:set[addr,port]) : interval) error in <...>/expire-func-type-check.zeek, line 40: &expire_func argument type clash (&expire_func=invalid_expire_func_index_params) error in <...>/expire-func-type-check.zeek, line 41: &expire_func attribute is not a function (&expire_func=invalid_expire_func_because_its_an_event) error in <...>/expire-func-type-check.zeek, line 42: &expire_func attribute is not a function (&expire_func=invalid_expire_func_because_its_a_hook) diff --git a/testing/btest/Baseline/language.redeclaration-redefinition-errors-10/out b/testing/btest/Baseline/language.redeclaration-redefinition-errors-10/out new file mode 100644 index 0000000000..938ee7cf3c --- /dev/null +++ b/testing/btest/Baseline/language.redeclaration-redefinition-errors-10/out @@ -0,0 +1,3 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +error in <...>/redeclaration-redefinition-errors.zeek, line 2 and <...>/redeclaration-redefinition-errors.zeek, line 1: incompatible function flavor (hook() : bool and event()) +error in <...>/redeclaration-redefinition-errors.zeek, line 3 and <...>/redeclaration-redefinition-errors.zeek, line 1: incompatible function flavor (function() : void and event()) diff --git a/testing/btest/Baseline/language.redeclaration-redefinition-errors-11/out b/testing/btest/Baseline/language.redeclaration-redefinition-errors-11/out new file mode 100644 index 0000000000..5276236bf5 --- /dev/null +++ b/testing/btest/Baseline/language.redeclaration-redefinition-errors-11/out @@ -0,0 +1,3 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +error in <...>/redeclaration-redefinition-errors.zeek, line 2 and <...>/redeclaration-redefinition-errors.zeek, line 1: incompatible function flavor (hook() : bool and function() : void) +error in <...>/redeclaration-redefinition-errors.zeek, line 3 and <...>/redeclaration-redefinition-errors.zeek, line 1: incompatible function flavor (event() and function() : void) diff --git a/testing/btest/Baseline/language.redeclaration-redefinition-errors-7/out b/testing/btest/Baseline/language.redeclaration-redefinition-errors-7/out index 01303dac40..df7232bafc 100644 --- a/testing/btest/Baseline/language.redeclaration-redefinition-errors-7/out +++ b/testing/btest/Baseline/language.redeclaration-redefinition-errors-7/out @@ -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 <...>/redeclaration-redefinition-errors.zeek, line 2 and <...>/redeclaration-redefinition-errors.zeek, line 1: alternate function prototype already exists (event() and record { }) +error in <...>/redeclaration-redefinition-errors.zeek, line 2 and <...>/redeclaration-redefinition-errors.zeek, line 1: alternate function prototype already exists (event()) diff --git a/testing/btest/Baseline/language.redeclaration-redefinition-errors-8/out b/testing/btest/Baseline/language.redeclaration-redefinition-errors-8/out index 938ee7cf3c..3f047b558f 100644 --- a/testing/btest/Baseline/language.redeclaration-redefinition-errors-8/out +++ b/testing/btest/Baseline/language.redeclaration-redefinition-errors-8/out @@ -1,3 +1,2 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. -error in <...>/redeclaration-redefinition-errors.zeek, line 2 and <...>/redeclaration-redefinition-errors.zeek, line 1: incompatible function flavor (hook() : bool and event()) -error in <...>/redeclaration-redefinition-errors.zeek, line 3 and <...>/redeclaration-redefinition-errors.zeek, line 1: incompatible function flavor (function() : void and event()) +error in <...>/redeclaration-redefinition-errors.zeek, line 2 and <...>/redeclaration-redefinition-errors.zeek, line 1: alternate function prototype already exists (event(x:bool, y:count)) diff --git a/testing/btest/Baseline/language.redeclaration-redefinition-errors-9/out b/testing/btest/Baseline/language.redeclaration-redefinition-errors-9/out index 5276236bf5..ce4bd48eb6 100644 --- a/testing/btest/Baseline/language.redeclaration-redefinition-errors-9/out +++ b/testing/btest/Baseline/language.redeclaration-redefinition-errors-9/out @@ -1,3 +1,2 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. -error in <...>/redeclaration-redefinition-errors.zeek, line 2 and <...>/redeclaration-redefinition-errors.zeek, line 1: incompatible function flavor (hook() : bool and function() : void) -error in <...>/redeclaration-redefinition-errors.zeek, line 3 and <...>/redeclaration-redefinition-errors.zeek, line 1: incompatible function flavor (event() and function() : void) +error in <...>/redeclaration-redefinition-errors.zeek, line 2 and <...>/redeclaration-redefinition-errors.zeek, line 1: alternate function prototype arg 'xx' not found in canonical prototype (event(xx:bool) and event(x:bool)) diff --git a/testing/btest/Baseline/language.undeclared-alternate-event-hook-prototype/out b/testing/btest/Baseline/language.undeclared-alternate-event-hook-prototype/out index 24ec43a913..f67f0b6c04 100644 --- a/testing/btest/Baseline/language.undeclared-alternate-event-hook-prototype/out +++ b/testing/btest/Baseline/language.undeclared-alternate-event-hook-prototype/out @@ -1,9 +1,9 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. -error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 13 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 4: use of undeclared alternate prototype (event(c:count; s:string;) and my_event) -error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 18 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 4: use of undeclared alternate prototype (event(s:string;) and my_event) -error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 23 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 4: use of undeclared alternate prototype (event(c:count;) and my_event) +error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 13 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 4: use of undeclared alternate prototype (event(c:count, s:string) and my_event) +error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 18 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 4: use of undeclared alternate prototype (event(s:string) and my_event) +error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 23 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 4: use of undeclared alternate prototype (event(c:count) and my_event) error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 28 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 4: use of undeclared alternate prototype (event() and my_event) -error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 38 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 6: use of undeclared alternate prototype (hook(c:count; s:string;) : bool and my_hook) -error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 43 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 6: use of undeclared alternate prototype (hook(s:string;) : bool and my_hook) -error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 48 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 6: use of undeclared alternate prototype (hook(c:count;) : bool and my_hook) +error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 38 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 6: use of undeclared alternate prototype (hook(c:count, s:string) : bool and my_hook) +error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 43 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 6: use of undeclared alternate prototype (hook(s:string) : bool and my_hook) +error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 48 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 6: use of undeclared alternate prototype (hook(c:count) : bool and my_hook) error in <...>/undeclared-alternate-event-hook-prototype.zeek, line 53 and <...>/undeclared-alternate-event-hook-prototype.zeek, line 6: use of undeclared alternate prototype (hook() : bool and my_hook) diff --git a/testing/btest/Baseline/signatures.bad-eval-condition/.stderr b/testing/btest/Baseline/signatures.bad-eval-condition/.stderr index 3502ffb60f..f4479230cb 100644 --- a/testing/btest/Baseline/signatures.bad-eval-condition/.stderr +++ b/testing/btest/Baseline/signatures.bad-eval-condition/.stderr @@ -1,4 +1,4 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. -warning in <...>/bad-eval-condition.zeek, line 9: Wrong number of arguments for function. Expected 2, got 1. (function(state:signature_state;) : bool) +warning in <...>/bad-eval-condition.zeek, line 9: Wrong number of arguments for function. Expected 2, got 1. (function(state:signature_state) : bool) error: Error in signature (./blah.sig:6): eval function parameters must be a 'signature_state' and a 'string' type (mark_conn) diff --git a/testing/btest/language/redeclaration-redefinition-errors.zeek b/testing/btest/language/redeclaration-redefinition-errors.zeek index 0981f2c67d..d0f721c5fd 100644 --- a/testing/btest/language/redeclaration-redefinition-errors.zeek +++ b/testing/btest/language/redeclaration-redefinition-errors.zeek @@ -42,6 +42,14 @@ event zeek_init() global ev: event(); global ev: event(); +@TEST-START-NEXT +global ev: event(x: bool, y: count); +global ev: event(x: bool, y: count); + +@TEST-START-NEXT +global ev: event(x: bool); +global ev: event(xx: bool); + @TEST-START-NEXT global f: event(); global f: hook();