Revert "Type: Add TypeManager->TypeList() and use for ListVal()"

This reverts commit 24c606b4df.

This commit introduced a memory leak ListVal::Append() modifying
the cached TYPE_ANY type list.
This commit is contained in:
Arne Welzel 2023-04-13 16:55:11 +02:00
parent 10f96aeba3
commit a0540f96a1
4 changed files with 4 additions and 36 deletions

View file

@ -1188,7 +1188,10 @@ ValPtr PatternVal::DoClone(CloneState* state)
return state->NewClone(this, make_intrusive<PatternVal>(re));
}
ListVal::ListVal(TypeTag t) : Val(type_mgr->TypeList(t)), tag(t) { }
ListVal::ListVal(TypeTag t) : Val(make_intrusive<TypeList>(t == TYPE_ANY ? nullptr : base_type(t)))
{
tag = t;
}
ListVal::~ListVal() { }