mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
directly construct records of known types, rather than requiring coercion
This commit is contained in:
parent
d165db6909
commit
9a429808ab
6 changed files with 81 additions and 12 deletions
|
@ -683,10 +683,8 @@ expr:
|
|||
switch ( ctor_type->Tag() ) {
|
||||
case TYPE_RECORD:
|
||||
{
|
||||
auto rce = make_intrusive<RecordConstructorExpr>(
|
||||
ListExprPtr{AdoptRef{}, $4});
|
||||
auto rt = cast_intrusive<RecordType>(ctor_type);
|
||||
$$ = new RecordCoerceExpr(std::move(rce), std::move(rt));
|
||||
$$ = new RecordConstructorExpr(rt, ListExprPtr{AdoptRef{}, $4});
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue