Skip to content

Enum values are now assignable to Object #151

@sophiajt

Description

@sophiajt

To align with the spec, assignment compatibility between Enum and Object now works correctly.

declare function f(x: Object): Object;
declare function f(x: E): E;

var r4 = f(E.A);  //type of r4 is now type Object rather than E

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking ChangeWould introduce errors in existing codeBy DesignDeprecated - use "Working as Intended" or "Design Limitation" instead

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions