-
-
Notifications
You must be signed in to change notification settings - Fork 326
Open
Description
The LUA minify seems to handle operator precedence wrong in some cases.
e.g.
Entering return (x+6)//4 will result in return x+6//4 which is NOT the same.
The latter would be evaluated as return x+(6//4).
If it helps, another way to look at it is that it would change something like floor((x+6)/4) to x + floor(6/4).
I'm guessing because internally + and // are incorrectly handled as same precedence?
See:
https://www.lua.org/pil/3.5.html -- However, note that // is missing here.
https://www.lua.org/manual/5.4/manual.html#3.4.8 -- Here // is shown to have the same precedence as: * / // %
Maybe while fixing this bug, also check other operator precedence issues?
Metadata
Metadata
Assignees
Labels
No labels