mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
GH-2669: Give script location for type clash in for-loop construction
This commit is contained in:
parent
c414136288
commit
5e68880470
2 changed files with 4 additions and 4 deletions
|
@ -1249,7 +1249,7 @@ ForStmt::ForStmt(IDPList* arg_loop_vars, ExprPtr loop_expr)
|
|||
else if ( lvt )
|
||||
{
|
||||
if ( ! same_type(lvt, ind_type) )
|
||||
lvt->Error("type clash in iteration", ind_type.get());
|
||||
e->Error("type clash in iteration", lvt.get());
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -1341,7 +1341,7 @@ ForStmt::ForStmt(IDPList* arg_loop_vars, ExprPtr loop_expr, IDPtr val_var)
|
|||
else if ( value_var->GetType() )
|
||||
{
|
||||
if ( ! same_type(value_var->GetType(), yield_type) )
|
||||
value_var->GetType()->Error("type clash in iteration", yield_type.get());
|
||||
e->Error("type clash in iteration", value_var->GetType().get());
|
||||
}
|
||||
else
|
||||
add_local(value_var, yield_type, INIT_NONE, nullptr, nullptr, VAR_REGULAR);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue