rokucommunity / brighterscript

A superset of Roku's BrightScript language
MIT License
162 stars 46 forks source link

Incorrect handling of bitwise `and` and `or` operators #1103

Closed TwitchBronBron closed 7 months ago

TwitchBronBron commented 7 months ago

Using and or or between two numbers results in a new number. However, the type system incorrectly assumes it's always a boolean. Here's an example: image image

  three = &h01 or &h02
  print three ' prints 3

  one = &h01 and &h01
  print one ' prints 1