Skip to content

Allow union type literals #1367

@FroMage

Description

@FroMage

I cannot make that code up, apparently there's good use-cases for that sort of thing:

String? returnStringOrNull() { return "foo"; }
OpenType stringOrNullType = `function returnStringOrNull`.openType;

Being able to have the literal for the String|Null model and declaration would be nice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions