mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 13:08:20 +00:00
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:
parent
5ef62b2de8
commit
bb80d80218
9 changed files with 18 additions and 36 deletions
14
src/Scope.cc
14
src/Scope.cc
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue