[Bug][move-compiler-v2] tuple assignment to var message is confusing #12669
Labels
bug
Something isn't working
compiler-v2
stale-exempt
Prevents issues from being automatically marked and closed as stale
🐛 Bug
PR 12223 fixes the error message in third_party/move/move-compiler-v2/tests/checking/typing/assign_wrong_arity.exp but it is still confusing.
The relevant code is:
The new error output is:
which is better than before, but it is still confusing because the real problem is assigning a tuple to a local var at all.
That test output is also failing to error on the previous statement which assigns
()
tox
, since those errors show up later in the compiler, in code generation. The message suggests that the type analysis is giving x a fixed type ofTuple(0)
, whichi is kind of strange.Anyway, this particular error should be easy enough to fix in type analysis by changing the error message if the target seems to be of type
Tuple(0)
.The text was updated successfully, but these errors were encountered: