zarqon
Well-known member
As discussed here, I've noted that mafia allows strings to be used on the left side of boolean operators && and ||, and on the right side as well but only if also present on the left side. Some examples (pasted from the linked thread):
I would like to request that all of those generate errors, as they are functionally pointless and almost certainly indicate coder error.
> ash ("foo" && "bar")
Returned: false
> ash ("foo" && "foo")
Returned: false
> ash ("foo" && true)
Returned: false
> ash (true && "bar")
Cannot apply operator && to true (boolean) and bar (string) (zlib.ash)
Returned: void
> ash string foo; if (foo) print("bar")
"if" requires a boolean conditional expression (zlib.ash)
Returned: void
> ash ("a" || "b")
Returned: b
> ash ("c" || "b")
Returned: b
I would like to request that all of those generate errors, as they are functionally pointless and almost certainly indicate coder error.