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: turn option_var.str() an error without unwrapping first #23563

Merged
merged 9 commits into from
Jan 25, 2025

Conversation

felipensp
Copy link
Member

@felipensp felipensp commented Jan 23, 2025

Fix #23558
Fix #23557

Copy link

Connected to Huly®: V_0.6-21991

@felipensp felipensp changed the title checker: make an error option_var.str() checker: make an error option_var.str() without unwrapping first Jan 23, 2025
@felipensp felipensp changed the title checker: make an error option_var.str() without unwrapping first checker: turn option_var.str() an error without unwrapping first Jan 23, 2025
@Delta456
Copy link
Member

I assumed this would work and give Option(option_var). This is also the same in the tests as they are failing.

@felipensp
Copy link
Member Author

I assumed this would work and give Option(option_var). This is also the same in the tests as they are failing.

Since we can't do opt_var.method() but have to unwrap it first. We're fixing this inconsistence here. '${opt_var}' still working to get the "Option(...)" string.

@Delta456
Copy link
Member

I think we can have this exception as '${option_var}' and option_var.str() mean the same thing.

@felipensp felipensp marked this pull request as ready for review January 24, 2025 15:21
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.

Thank you for making the compiler stricter and more predictable 🙇🏻‍♂️ .

@spytheman spytheman merged commit 5be2fca into vlang:master Jan 25, 2025
72 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
3 participants