bcc
bcc copied to clipboard
Incorrect precedence for casts without parentheses
When casting to built-in types, parentheses are optional. Such a cast is supposed to have the same operator precedence as other unary operators (+
, -
, ~
, Not
, SizeOf
and Varptr
), as is vanilla behaviour and listed on the "Expressions" help page.
NG currently gets this wrong:
SuperStrict
Framework BRL.StandardIO
Print Int "1" + 3 + "a"
Expected output: 4a
(as produced by Print Int("1") + 3 + "a"
)
Actual output: 13a
(as produced by Print Int("1" + 3) + "a"
)