mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
Add same_type() overloads for IntrusivePtr args
This commit is contained in:
parent
2c4cc95e7c
commit
6a1c312451
17 changed files with 145 additions and 136 deletions
|
@ -741,7 +741,7 @@ bool SwitchStmt::AddCaseLabelTypeMapping(ID* t, int idx)
|
|||
{
|
||||
for ( auto i : case_label_type_list )
|
||||
{
|
||||
if ( same_type(i.first->GetType().get(), t->GetType().get()) )
|
||||
if ( same_type(i.first->GetType(), t->GetType()) )
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1080,7 +1080,7 @@ ForStmt::ForStmt(id_list* arg_loop_vars, IntrusivePtr<Expr> loop_expr)
|
|||
|
||||
if ( lvt )
|
||||
{
|
||||
if ( ! same_type(lvt.get(), ind_type.get()) )
|
||||
if ( ! same_type(lvt, ind_type) )
|
||||
lvt->Error("type clash in iteration", ind_type.get());
|
||||
}
|
||||
|
||||
|
@ -1151,7 +1151,7 @@ ForStmt::ForStmt(id_list* arg_loop_vars,
|
|||
// Verify value_vars type if its already been defined
|
||||
if ( value_var->GetType() )
|
||||
{
|
||||
if ( ! same_type(value_var->GetType().get(), yield_type.get()) )
|
||||
if ( ! same_type(value_var->GetType(), yield_type) )
|
||||
value_var->GetType()->Error("type clash in iteration", yield_type.get());
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue