Skip to content

checker: fix none check for match expr with option - #22732

Merged
spytheman merged 1 commit into
vlang:masterfrom
felipensp:fix_option_match_expr
Nov 2, 2024
Merged

spytheman merged 1 commit into
vlang:masterfrom
felipensp:fix_option_match_expr

Conversation

@felipensp

@felipensp felipensp commented Nov 2, 2024 •

Copy link
Copy Markdown
Member

@felipensp
felipensp marked this pull request as ready for review November 2, 2024 10:52

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent work.


fn (p Post) get_part_2() string {
match p.part {
// Next weird line crashes compiler before sugesting 'unwrap' var?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That comment is part of the issue, but is fixed here; imho remove it, since it will be confusing for people in the future.

@spytheman
spytheman merged commit 1937cdd into vlang:master Nov 2, 2024
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.

Trying to match an option with none without unwrapping

3 participants