Skip to content

Allow type T1?|T2? #3177

Open
Open
@Masquue

Description

@Masquue

T1?|T2? is now parsed as T1?, whose correct form should be (T1|T2)? or T1|T2|nil or field? T1|T2.

But many libraries (e.g. neovim plugins) are using this incorrect form.

This misuse is so prevalent that should we consider making this form legal?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions