mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Merge remote-tracking branch 'origin/topic/robin/gh-467-addto'
- In this merge commit: fixed parentheses/typo that breaks compilation * origin/topic/robin/gh-467-addto: Catch if &add_func/&delete_func is applied to IDs that don't have values.
This commit is contained in:
commit
3fc86a39b8
5 changed files with 32 additions and 1 deletions
|
@ -220,6 +220,13 @@ void ID::SetVal(ExprPtr ev, InitClass c)
|
|||
if ( ! a )
|
||||
Internal("no add/delete function in ID::SetVal");
|
||||
|
||||
if ( ! val )
|
||||
{
|
||||
Error(fmt("%s initializer applied to ID without value",
|
||||
c == INIT_EXTRA ? "+=" : "-="), this);
|
||||
return;
|
||||
}
|
||||
|
||||
EvalFunc(a->GetExpr(), std::move(ev));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue