-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
In a composite "if" statement combining expressions with a boolean operator, if the second expression contains a "not" operator, then the second expression must be surrounded by parentheses. Not doing so causes a compilation error (Syntax error: expected identifier, found logic not).
For example:
function init() {
# This is invalid syntax and causes a compilation error
if (1 and not 0) {
log("hello")
}
# This is valid syntax
if (1 and (not 0)) {
log("hello")
}
}This requirement seems unintuitive when comparing to languages like Python, where the parentheses would not be necessary.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels