Description
Description:
$title, to check if we can introduce any improvements.
Fields and methods of intersection types generally need to be populated after the fields and methods of the original/referred type are populated since we need them to define the new fields/methods.
Right now, this too is done in SymbolEnter
but we need to iterate through all the types and check inclusions also, to look for types that need to be populated, which at times can result in repeated checks.
In addition, in the case of readonly
intersections, for records and objects we need to maintain a reference to the mutable type also to populate these fields.
Creating this issue to revisit the implementation to see if we can introduce some improvements, may be by maintaining intersection types separately and/or separating this out to a new phase?