-
Notifications
You must be signed in to change notification settings - Fork 2
Add support for If Expression #38
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
Conversation
| } | ||
| }; | ||
| self.register_type(if_expr_typed, if_expr.get_range()); | ||
| Ok(self.owned_typed_value(if_expr_typed)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to return borrow union here, I am currently impl this... @edilson258 is ok to wait for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and that union is suppose to be only used internally??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes... exemple we need to tracker a owner value for all possible return
✨ Add support for
ifexpressions (ternary-like operator)This PR introduces support for
ifexpressions, allowing conditional assignment in expression form, similar to the ternary operator in other languages.✅ Example usage: