I’m scratching my head at a few problems with my typechecking.
I have non-strict on by default.
1. Type ‘boolean?’ could not be converted into boolean.
This is an example. My code doesn’t do this, however, it is a recursive function.
local foo = {}
local quux = {}
foo.bar = setmetatable( {
baz = function( bool: boolean? )
if ( not bool ) then
foo.bar.baz( true )
end
end,
}, {
__index = quux
} )
Although this looks fine, luau type checking turns the entire function into a warning with no reasonable answer why.
(The same warnings exist without __index aswell.)
I’m somewhat leaning towards the first problem being a luau issue and the second one being a lack of a luau feature. (An @metatable type would be very nice.)