[Bug][compiler-v2] Locations available in stackless bytecode are incorrect when wildcards are involved #12843
Labels
bug
Something isn't working
compiler-v2
stale-exempt
Prevents issues from being automatically marked and closed as stale
🐛 Bug
This bug pertains to compiler v2 (and the bug description should be read with that context in mind).
When we have move code involving wildcards, like
let _ = x;
, the AST to stackless bytecode translation does not pass on location information correctly (in particular, it is different from how location information is passed on for saylet _1 = x;
).Because of this, when there are errors involved in such code, that stackless-bytecode-based checkers can report, the location provided in the error messages point to incorrect part of the code.
Consider the following example (taken from
third_party/move/move-compiler-v2/tests/bytecode-generator/wildcard2.move
):Compiler v2 reports the following error (note where we point to):
Another similar example can be seen in
third_party/move/move-compiler-v2/tests/bytecode-generator/wildcard7.exp
after #12818 lands.The text was updated successfully, but these errors were encountered: