Stmt: Error on deprecated when/local usage

This has been around since Zeek v4.1, so it was warned about in Zeek 5.0
LTS and we could've removed it with 5.1.

Also removed merge_top_scope() from the zeek::detail namespace, it's
unused now.

Updated the when-aggregates test somehow. I'm not quite sure what had
been tested there :-/
This commit is contained in:
Arne Welzel 2023-03-17 14:52:28 +01:00
parent 5ef62b2de8
commit bb80d80218
9 changed files with 18 additions and 36 deletions

View file

@ -190,20 +190,6 @@ ScopePtr pop_scope()
return old_top;
}
void merge_top_scope()
{
if ( scopes.size() < 2 )
reporter->InternalError("scope merge underflow");
auto t = pop_scope();
for ( const auto& v : t->OrderedVars() )
{
v->SetOffset(top_scope->Length());
top_scope->Insert(v->Name(), v);
}
}
ScopePtr current_scope()
{
return top_scope;