Skip to content

Incorrectly minifies parenthetical expressions #50

@jrtitus

Description

@jrtitus

Specifically related to bit manipulation in this particular case

Lua Version: 5.3

Before minification

return ((x or -1) & (y or -1)) & 0xFFFFFFFF

--[[
let x = 1021, y = 251
Result = 249
]]

After minification

return c or-1&d or-1&0xFFFFFFFF

--[[
let x = 1021, y = 251
Result = 1021
]]

Expected result

-- Parenthesis required for order of operations!!!
return((c or-1)&(d or-1))&0xFFFFFFFF

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions