Skip to content

request: optionally disable enum/number implicit conversion #17734

Closed
@Spongman

Description

@Spongman

now that we have union types, can we please have an option to disable the enum/number implicit casts?

I'd really like the following to give me an error:

enum Shape { Circle, Square, Pentagon, Pyramid }
var f = Math.sin(Shape.Square)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions