verichains / revela

Decompiler for Move smart contracts
https://revela.verichains.io
Other
43 stars 10 forks source link

fix: missing parenthese when decompile cast operation #2

Closed khanhnt2 closed 6 months ago

khanhnt2 commented 6 months ago

Fix issue #1

I'm not familiar with Move language. I saw this repo on my social feeds, it's great to see Vietnamese people make the project 😄

My fix is always to add parentheses to cast operation, even though it's a stand-alone expression. Not sure this is a good solution

khanhnt2 commented 6 months ago

Maybe I have to implement 'Ret' operation for the better solution

vhqtvn commented 6 months ago

We already added brackets for casting operator but need to revert at some point due to syntax error. I'll check it again.

aquynh commented 6 months ago

@khanhnt2, thank you for the first ever pull req!

can you put the new testcases into a new separate file, rather than adding them to BasicCoin-test.move?

khanhnt2 commented 6 months ago

@aquynh, I moved the tests to the new CastOperation-test.move file

aquynh commented 6 months ago

merged, thanks!