leo icon indicating copy to clipboard operation
leo copied to clipboard

[Bug] division should not be supported for scalar type

Open bendyarm opened this issue 3 years ago • 2 comments

🐛 Bug Report

In tests/compiler/scalar/div.leo there is a division with two scalar operands,
with expectation: Pass,
but the AVM does not support division of scalars. This test should be changed to expectation: Fail (and the compiler changel, as needed).

This is in the testnet3 branch, commit 977e3369e.

bendyarm avatar Jun 27 '22 06:06 bendyarm

Good catch. This bug exists on the improved-flattening branch as well. I will be doing the change there since the type checker had to go through some changes and bug fixes, and it will be easier than merging a PR and then updating it to fit the changes.

gluax avatar Jun 27 '22 16:06 gluax

This wasn't actually blocking flattening so I will fix this in another PR.

gluax avatar Jun 29 '22 17:06 gluax

The scalar division test correctly checks for failure now so this issue can be closed.

collinc97 avatar Jan 05 '23 22:01 collinc97