sjbarag / brs

An interpreter for the BrightScript language that runs on non-Roku platforms.
MIT License
113 stars 43 forks source link

Binary operators "and", "not", "or" failing on integers #561

Open niveditasonker opened 4 years ago

niveditasonker commented 4 years ago

Code for XOR fires error- Attempting to NOT non-boolean value

function xor(a as integer, b as integer) as integer
    if a = 0 then return b
    if b = 0 then return a
    return ((a and not b) or (not a and b))
end function
lvcabral commented 1 year ago

Duplicate of #457