Skip to content

Revisit how fields and methods of intersection types are populated #27948

Open
@MaryamZi

Description

@MaryamZi

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area/CompilerInternalInternal tasks such as code cleanup, etc #CompilerTeam/CompilerFEAll issues related to Language implementation and Compiler, this exclude run times.Type/Improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions