-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Implements the Eq
trait for Option
#5302
Conversation
…into option_eq_trait
Will need help with adding assignees, adding labels, and requesting reviewers due to permissions. |
Not sure why the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe that we need to check the permutations anymore and all of these negations can probably be cleaned up too.
Besides that, I need to block this until all primitives are tested. An integer and bool are insufficient here despite the trait constraint.
Once all types are tested this will be good to merge
test/src/e2e_vm_tests/test_programs/should_pass/stdlib/option_eq/Forc.toml
Outdated
Show resolved
Hide resolved
test/src/e2e_vm_tests/test_programs/should_pass/stdlib/option_eq/src/main.sw
Outdated
Show resolved
Hide resolved
…eq/Forc.toml Co-authored-by: Braqzen <103777923+Braqzen@users.noreply.github.com>
…into option_eq_trait
Cleaned up the permutations and negations. Tests were rewritten and now include the following types that were listed as primitives in the Sway Book:
The only problem is with
Not sure what is causing this, but will look into it. It's possible that I am just handling it incorrectly. |
Decided to skip over the fixed-length string tests and remove them. They are not within the constraints of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Struct, enum, tuple and array tests?
Wasn't sure if these were within the scope for testing because they aren't primitive types. Though you're right, it's probably a good idea to test them anyways. Tests with them pass, however, implementing the
|
test/src/e2e_vm_tests/test_programs/should_pass/stdlib/option_eq/test.toml
Show resolved
Hide resolved
yeah that's my bad. I meant built-ins but said primitives |
The recent PR #5210 that changes the way |
Seems like this PR doesn't pass the tests on master. The last passing check was probably a false positive since removing the EDIT: no more errors on master |
Description
Closes #3542
Implements the
Eq
trait forOption
. Also adds tests for the implementation.Checklist
Breaking*
orNew Feature
labels where relevant.