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

cgen, checker: fix wrong receiver generic resolution with embed types #21833

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

felipensp
Copy link
Member

Fix #21815

@felipensp felipensp marked this pull request as ready for review July 9, 2024 18:53
Comment on lines +1600 to +1605
// fn which has any generic dependent expr
if node.args.any(c.comptime.is_generic_param_var(it.expr)) {
return true
}
// fn[T]() or generic_var.fn[T]()
node.concrete_types.any(it.has_flag(.generic))
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure, which condition is cheaper to check first.

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.

@spytheman spytheman merged commit 04ff511 into vlang:master Jul 10, 2024
74 of 76 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.

Wrong receiver generic resolution on method call
2 participants