GDScript: enable type checks on release mode

Also make builtin GDScript functions report return type as Variant in
release so type is converted when needed.
This commit is contained in:
George Marques 2020-01-08 12:22:41 -03:00
parent ae21664655
commit d26414f9fe
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D
3 changed files with 38 additions and 9 deletions

View file

@ -2057,12 +2057,13 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
mi.return_val.type = Variant::BOOL;
return mi;
} break;
case FUNC_MAX: {
default: {
ERR_FAIL_V(MethodInfo());
} break;
}
#endif
return MethodInfo();
MethodInfo mi;
mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
return mi;
}