Skip to content

cgen: implement > and < for structs - #7774

Merged
medvednikov merged 10 commits into
vlang:masterfrom
Delta456:gt_lt_op
Jan 1, 2021
Merged

medvednikov merged 10 commits into
vlang:masterfrom
Delta456:gt_lt_op

Conversation

@Delta456

@Delta456 Delta456 commented Jan 1, 2021 •

Copy link
Copy Markdown
Member

This PR implements using > and < as operator overloading. If used then they must return type bool.

For example and usage see.

@Delta456

Delta456 commented Jan 1, 2021 •

Copy link
Copy Markdown
Member Author

I do not understand why it is failing as locally it is working.
Can anyone help?

/tmp/v/v.5599219661117039425.tmp.c:48001:6: error: implicit declaration of function ‘v__gen__x64__Register__lt’; did you mean ‘v__gen__x64__Register_str’? [-Werror=implicit-function-declaration]
  if (v__gen__x64__Register__lt(reg, v__gen__x64__Register_r8)) {

EDIT: Fixed

Comment thread vlib/log/log.v Outdated
Comment thread vlib/v/parser/fn.v
@Delta456
Delta456 marked this pull request as ready for review January 1, 2021 11:43
@medvednikov
medvednikov merged commit 24b18f0 into vlang:master Jan 1, 2021
@Delta456
Delta456 deleted the gt_lt_op branch January 1, 2021 14:00
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.

2 participants