mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
BIT-1350: improve record coercion type checking.
For a field of the same name in both the target type and the coerced type, a type mismatch is now reported as an error at parse-time.
This commit is contained in:
parent
da24fa40a5
commit
48fccb3bce
4 changed files with 42 additions and 8 deletions
|
@ -4186,6 +4186,9 @@ RecordCoerceExpr::RecordCoerceExpr(Expr* op, RecordType* r)
|
|||
map[t_i] = i;
|
||||
}
|
||||
|
||||
if ( IsError() )
|
||||
return;
|
||||
|
||||
for ( i = 0; i < map_size; ++i )
|
||||
{
|
||||
if ( map[i] == -1 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue