mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
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:
parent
ae21664655
commit
d26414f9fe
3 changed files with 38 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue