Boolean Parameters Treat nil as true.
I stumbled across this with entity:set_enabled(nil)
, but the error seems to be in LuaTools::opt_boolean
so it probably effects a lot of other cases. Nil here is treated as a true, it is supposed to be an error and if it wasn't it should be treated as false. There was a very brief discussion about which to use, for now we will be saying with the error.
If we are right the lua_isnoneornil
in opt_boolean
has to be replaced with lua_isnone
. But since this appears to be a regression adding a test first would be great.