You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding notes from discord:
Thanks! It's not just format though. It compiles into extract <tealish.expression_nodes.Group object at 0x1070da8e0> 32 which is obv not valid Teal.
There should actually be a compile time error here because extract expects literals for the first two arguments, not expressions
I think you want to use extract3 here: https://tealish.tinyman.org/en/latest/avm.html#extract3
The docs are not clear on what the difference here is unfortunately (auto generated docs limitation :() but I think this should work: extract3(frc_proofs, (index * 32), 32)
Anyway, thanks for the report, I'll figure out what exactly needs to be fixed in Tealish.
Solution
Tealish needs to detect when the args to extract are expressions and use the stack version (extract3) instead of the immediates version. Need to figure out if that can be generalised 🤔
Or just raise an error here because arg1 should be a literal rather than expression?
Describe the bug
Using tealish format converts the following code in wrong way
To Reproduce
with something with this run
tealish format approval.tl
and outputs this
Expected behavior
Just format the code not change the code
The text was updated successfully, but these errors were encountered: