Val: cast_value_to_type() returns IntrusivePtr

This commit is contained in:
Max Kellermann 2020-02-27 10:15:03 +01:00
parent 96951c1300
commit 3331abb4f2
4 changed files with 6 additions and 8 deletions

View file

@ -834,7 +834,7 @@ Val* SwitchStmt::DoExec(Frame* f, Val* v, stmt_flow_type& flow) const
if ( matching_id )
{
auto cv = cast_value_to_type(v, matching_id->Type());
f->SetElement(matching_id, cv);
f->SetElement(matching_id, cv.release());
}
flow = FLOW_NEXT;