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

checker: fix sumtype variant option type mismatch #23659

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

felipensp
Copy link
Member

type Any = ?int | string
type Any2 = ?int | ?string

_ := ?Any(?string('baz')) // must be an error
_ := ?Any(string('baz')) // must be ok
_ := ?Any('baz') // must be ok

_ := ?Any2(?string('baz')) // must be ok
_ := ?Any2(string('baz')) // must be an error
_ := ?Any2('baz') // must be an error

Copy link

Connected to Huly®: V_0.6-22080

@felipensp felipensp marked this pull request as ready for review February 7, 2025 10:33
Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work - less code, more features working 🥳 .

@spytheman spytheman merged commit a4541c2 into vlang:master Feb 7, 2025
72 checks passed
@felipensp felipensp deleted the fix_checker_sumtype_option branch February 7, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants