The following code:
static bool Test(Func<bool> condition) {
return condition?.Invoke() ?? true;
}
always returns true, because it compiles to:
Test = function (condition)
local default = condition
if default ~= nil then
default = default()
end
return default or true
end