bcc icon indicating copy to clipboard operation
bcc copied to clipboard

Incorrect precedence for casts without parentheses

Open HurryStarfish opened this issue 5 years ago • 0 comments

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")

HurryStarfish avatar Nov 01 '19 20:11 HurryStarfish