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

fix(gnovm): correct comparison between different types #1890

Merged
merged 134 commits into from
Aug 16, 2024

Conversation

ltzmaxwell
Copy link
Contributor

@ltzmaxwell ltzmaxwell commented Apr 4, 2024

Fixes #1376, fixes #2386.

@ltzmaxwell ltzmaxwell marked this pull request as ready for review July 30, 2024 10:36
@ltzmaxwell ltzmaxwell changed the title fix (gnovm): correct comparison between different types fix(gnovm): correct comparison between different types Jul 30, 2024
@ltzmaxwell
Copy link
Contributor Author

Hi @thehowl , this one is good for review. 🙏

gnovm/pkg/gnolang/op_expressions.go Outdated Show resolved Hide resolved
examples/gno.land/p/demo/uassert/uassert_test.gno Outdated Show resolved Hide resolved
Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

LGTM.

cc @deelawn for second review.

examples/gno.land/p/demo/uassert/uassert.gno Outdated Show resolved Hide resolved
Copy link
Contributor

@deelawn deelawn left a comment

Choose a reason for hiding this comment

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

Nice job 👍

I am surprised to see which test cases work every time I review one of these type PRs 😅

I made a few suggestions for things to change, but looks good otherwise

gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/op_expressions.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/tests/files/types/iface_eql.gno Outdated Show resolved Hide resolved
gnovm/tests/files/types/cmp_iface_0_stdlibs.gno Outdated Show resolved Hide resolved
gnovm/tests/files/types/cmp_iface_1.gno Outdated Show resolved Hide resolved
@ltzmaxwell ltzmaxwell merged commit 8bd07c9 into gnolang:master Aug 16, 2024
115 checks passed
MikaelVallenet pushed a commit to MikaelVallenet/gno that referenced this pull request Aug 17, 2024
ltzmaxwell added a commit that referenced this pull request Sep 11, 2024
This closes #2719.

copy from #2719:
>#1890 introduced strict type
comparison, which is the correct approach but overlooked the problem
mentioned above, resulting in the comparison between bool and untyped
bool. I will provide a fix soon.
<!-- please provide a detailed description of the changes made in this
pull request. -->

<details><summary>Contributors' checklist...</summary>

- [ ] Added new tests, or not needed, or not feasible
- [ ] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [ ] Updated the official documentation or not needed
- [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [ ] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
- [ ] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

bug(gnovm): incorrect type comparison 0 "numeric errors" will be == to any error created with errors.New
4 participants