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: fix return type of alias primitive operator overloading #21663

Merged
merged 8 commits into from
Jun 12, 2024

Conversation

Delta456
Copy link
Member

Fixes #21654

@Delta456
Copy link
Member Author

I don't understand why https://github.com/vlang/v/actions/runs/9468240132/job/26089267012?pr=21663 is failing. The fail is unrelated to my changes.

@Delta456 Delta456 marked this pull request as ready for review June 11, 2024 18:51
@Delta456 Delta456 requested a review from spytheman June 12, 2024 09:25
vlib/v/checker/infix.v Outdated Show resolved Hide resolved
@spytheman spytheman merged commit 44c8c0f into vlang:master Jun 12, 2024
76 checks passed
@@ -435,7 +435,27 @@ fn (mut c Checker) infix_expr(mut node ast.InfixExpr) ast.Type {
c.check_div_mod_by_zero(node.right, node.op)
}

return_type = promoted_type
left_sym = c.table.sym(unwrapped_left_type)
Copy link
Member

Choose a reason for hiding this comment

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

please add comments for such large code blocks to explain what they are for

Copy link
Member Author

Choose a reason for hiding this comment

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

ok! will add this in my next PR

@Delta456 Delta456 deleted the alias_return_type_accurate branch June 12, 2024 18:33
raw-bin pushed a commit to raw-bin/v that referenced this pull request Jul 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.

operator overloading not work: invalid operator + to voidptr and voidptr
3 participants