Skip to content

checker: fix compound selector smartcasting/option unwrapping - #24712

Merged
spytheman merged 5 commits into
vlang:masterfrom
felipensp:fix_smartcast_selector
Jun 15, 2025
Merged

spytheman merged 5 commits into
vlang:masterfrom
felipensp:fix_smartcast_selector

Conversation

@felipensp

@felipensp felipensp commented Jun 13, 2025 •

Copy link
Copy Markdown
Member

Fix #24662

This PR makes working:
if expr.left is ast.Ident && expr.right is ast.Ident {
and
if values.option_1 != none && values.option_2 != none {

@huly-for-github

Copy link
Copy Markdown

Connected to Huly®: V_0.6-23066

@felipensp felipensp changed the title checker: fix compound selector option unwrapping on infix checker: fix compound selector option smartcasting/unwrapping Jun 14, 2025
@felipensp felipensp changed the title checker: fix compound selector option smartcasting/unwrapping checker: fix compound selector smartcasting/option unwrapping Jun 14, 2025
@felipensp
felipensp marked this pull request as ready for review June 14, 2025 14:53

@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.
The additional interpolations on the common path of the find/register methods, are a bit expensive, but we can probably optimize that later.

image

@spytheman
spytheman merged commit 12c20e3 into vlang:master Jun 15, 2025
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.

if: check of various options fail if the two options are used in the scope in the if

3 participants