mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
GH-2920: Don't warn on uninitialized container options
This commit is contained in:
parent
c5ce82143a
commit
fcf7af259c
6 changed files with 46 additions and 2 deletions
|
@ -381,7 +381,7 @@ static void make_var(const IDPtr& id, TypePtr t, InitClass c, ExprPtr init,
|
|||
|
||||
if ( dt == VAR_OPTION )
|
||||
{
|
||||
if ( ! init )
|
||||
if ( ! init && ! IsContainer(t->Tag()) )
|
||||
id->Error("option variable must be initialized");
|
||||
|
||||
id->SetOption();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue