Type: merge_types() returns IntrusivePtr

This commit is contained in:
Max Kellermann 2020-03-03 18:57:05 +01:00
parent 50d53b2973
commit cf11d78483
3 changed files with 27 additions and 32 deletions

View file

@ -3347,12 +3347,11 @@ VectorConstructorExpr::VectorConstructorExpr(IntrusivePtr<ListExpr> constructor_
return;
}
BroType* t = merge_type_list(op->AsListExpr());
auto t = merge_type_list(op->AsListExpr());
if ( t )
{
SetType(make_intrusive<VectorType>(IntrusivePtr{NewRef{}, t}));
Unref(t);
SetType(make_intrusive<VectorType>(std::move(t)));
}
else
{