-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong Type Deduction for LEN #210
Comments
Thanks for the report. |
dibyendumajumdar
added a commit
that referenced
this issue
Feb 14, 2021
dibyendumajumdar
added a commit
that referenced
this issue
Feb 14, 2021
Hi thanks for the report and analysis - you are correct here. I have pushed a fix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The return type for LEN is wrong if the
__len
metamethod for floats or integers is overwritten and the length from an array element from a ravi array is taken. As in the following example which errors withsrc/lvm.c:2428: luaV_execute: Assertion `((((rb))->tt_) == (((3) | ((1) << 4))))' failed.
The problem is that
luaK_exp2anyreg
can change theravi_type
if it is a load from an index as in the example above. The problematic place isravi/src/lcode.c
Line 1270 in 56a59a1
Following is the wrong bytecode with the unexpected
ADDII
The text was updated successfully, but these errors were encountered: