You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +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:
@@ -670,6 +670,30 @@ static void _disassemble_class(const Ref<GDScript> &p_class, const Vector<String
|
||||
txt += "= false";
|
||||
incr += 2;
|
||||
|
||||
} break;
|
||||
case GDScriptFunction::OPCODE_ASSIGN_TYPED_BUILTIN: {
|
||||
|
||||
txt += " assign typed builtin (";
|
||||
txt += Variant::get_type_name((Variant::Type)code[ip + 1]);
|
||||
txt += ") ";
|
||||
txt += DADDR(2);
|
||||
txt += " = ";
|
||||
txt += DADDR(3);
|
||||
incr += 4;
|
||||
|
||||
} break;
|
||||
case GDScriptFunction::OPCODE_ASSIGN_TYPED_NATIVE: {
|
||||
Variant className = func.get_constant(code[ip + 1]);
|
||||
GDScriptNativeClass *nc = Object::cast_to<GDScriptNativeClass>(className.operator Object *());
|
||||
|
||||
txt += " assign typed native (";
|
||||
txt += nc->get_name().operator String();
|
||||
txt += ") ";
|
||||
txt += DADDR(2);
|
||||
txt += " = ";
|
||||
txt += DADDR(3);
|
||||
incr += 4;
|
||||
|
||||
} break;
|
||||
case GDScriptFunction::OPCODE_CAST_TO_SCRIPT: {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user