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

bug: Crash when trying to make '==' with two into() #2171

Closed
gaetbout opened this issue Feb 16, 2023 · 0 comments · Fixed by #2177
Closed

bug: Crash when trying to make '==' with two into() #2171

gaetbout opened this issue Feb 16, 2023 · 0 comments · Fixed by #2177
Labels
bug Something isn't working

Comments

@gaetbout
Copy link
Contributor

gaetbout commented Feb 16, 2023

Bug Report

Cairo version:

Tried at commit f030973

Current behavior:
While trying to:
assert(contract_address1.into() == contract_address2.into(), 'Some message');

Makes me crash into:
thread 'main' panicked at 'Types should be fully resolved at this point.'

But if I do:
assert(contract_address1.into() == contract_address_to_felt(contract_address1), 'Some message');

It works, as the left side knows it should transform into the felt type to comply with the right side

Expected behavior:

It shouldn't complain and resolve a common type they both can agree on.

Other information:

Maybe ContractAddress should implement the PartialEq and Eq trait to not have to perform this operation.
But still it should be fixed

@gaetbout gaetbout added the bug Something isn't working label Feb 16, 2023
spapinistarkware added a commit that referenced this issue Feb 18, 2023
Move type reducing after trait resolving
Solves #2171
@spapinistarkware spapinistarkware linked a pull request Feb 18, 2023 that will close this issue
spapinistarkware added a commit that referenced this issue Feb 18, 2023
Move type reducing after trait resolving
Solves #2171
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant