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: disallow using aliases of ?Type as !Type #21128

Merged
merged 6 commits into from
Mar 29, 2024

Conversation

Delta456
Copy link
Member

Fixes #21123

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.

That should be a checker error, not a parser one.
The parser does not have complete type info (the alias may be defined in another file, in the same module), while the checker does.

@spytheman spytheman marked this pull request as draft March 28, 2024 11:49
@spytheman spytheman self-assigned this Mar 28, 2024
@spytheman
Copy link
Member

(rebased over master)

@spytheman spytheman marked this pull request as ready for review March 29, 2024 06:15
@spytheman spytheman changed the title parser: disallow Result alias where parent type is an Option error: disallow using aliases of ?Type as !Type Mar 29, 2024
@spytheman spytheman changed the title error: disallow using aliases of ?Type as !Type checker: disallow using aliases of ?Type as !Type Mar 29, 2024
@spytheman spytheman merged commit 1400f64 into vlang:master Mar 29, 2024
54 checks passed
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.

cannot return an option from function that returns alias to Option as Result
2 participants