-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Feature] Implement type unions T1 | T2 | T3 ... Tn
#496
Comments
Luna-Klatzer
added a commit
that referenced
this issue
Jul 24, 2024
Luna-Klatzer
added a commit
that referenced
this issue
Jul 24, 2024
8 tasks
Internal unions and base logic implemented by #680. |
T1 | T2 | T3 ... Tn
4 tasks
5 tasks
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Is there an existing proposal for this?
This feature does not exist in the latest version
Proposal
Implement support for union types, which allow declarations to have more complex types and be used in more complex situations.
The syntax for unions would be:
Where
n
would be any desired value i.e. there is no compiler-enforced limit of the maximum amount of unioned types.For example:
Exact behaviour / changes you want
Related issues
str
,num
,bool
etc. #495The text was updated successfully, but these errors were encountered: