Skip to content
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

[compiler] add basic support for type-checked mixed union types #734

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

quasilyte
Copy link
Contributor

Types like int|string can now be expressed in the type system. Every mixed union variant sets a bit flag inside TypeData.

When generating the C++ code, any mixed unions become simple mixed types.

Right now we only check function parameters passing and field assignments. Mixed union types are washed away in all contexts except for the phpdoc. We'll remove this restriction later, when more code will be ready to adapt for this change.

Types like `int|string` can now be expressed in the type system.
Every mixed union variant sets a bit flag inside TypeData.

When generating the C++ code, any mixed unions become simple mixed types.

Right now we only check function parameters passing and field assignments.
Mixed union types are washed away in all contexts except for the phpdoc.
We'll remove this restriction later, when more code will be ready to
adapt for this change.
@unserialize unserialize added the enhancement New feature or request label Feb 2, 2023
@Tsygankov-Slava Tsygankov-Slava mentioned this pull request Jul 3, 2023
44 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants