Skip to content
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

[BUG] VM bytecode logical error #18

Closed
DotRacel opened this issue Jan 23, 2022 · 2 comments · Fixed by #19
Closed

[BUG] VM bytecode logical error #18

DotRacel opened this issue Jan 23, 2022 · 2 comments · Fixed by #19
Assignees
Labels
bug Something isn't working

Comments

@DotRacel
Copy link

DotRacel commented Jan 23, 2022

Describe the bug
as the title says

Expected behavior
returns a wrong value

To Reproduce

local a, b = "aaa", "aaa"
local c = a == b == true
print(c)

using vmify

Additional context
it is supposed to print "true", but it returns "false"

@DotRacel DotRacel added the bug Something isn't working label Jan 23, 2022
@levno-710
Copy link
Member

levno-710 commented Jan 23, 2022

Problem Found

The problem seems to be that the parser parses the given code as

local a, b = "aaa", "aaa"
local c = a == (b == true)
print(c)

Im currently working on fixing this

@levno-710 levno-710 self-assigned this Jan 23, 2022
@levno-710 levno-710 mentioned this issue Jan 23, 2022
@levno-710
Copy link
Member

levno-710 commented Jan 23, 2022

Fixed

I managed to fix the bug in the Parser.
The fix is included in release v0.1.8 or newer.

Thanks @DotRacel for reporting this significant Bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants