-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Implement type unions T1 | T2 | T3 ... Tn
#496
Comments
Luna-Klatzer
changed the title
[Feature] Implement support for custom inline union types
[Feature] Implement support for custom inline type unions
Jul 27, 2023
Luna-Klatzer
moved this from Todo
to Under Consideration
in Kipper Language Development
Jul 18, 2024
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. |
Luna-Klatzer
changed the title
[Feature] Implement support for custom inline type unions
[Feature] Implement type unions Sep 25, 2024
T1 | T2 | T3 ... Tn
Luna-Klatzer
moved this from Under Consideration
to Todo
in Kipper Language Development
Sep 25, 2024
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in 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: