summaryrefslogtreecommitdiffstats
path: root/main/tests/test_gdscript.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-01-08 18:22:38 +0100
committerGitHub <noreply@github.com>2020-01-08 18:22:38 +0100
commitc456d87ee60ec0609b21ff0476a06efaaae21719 (patch)
treec81b699f6f4766e503099774b4b78e565de4baa1 /main/tests/test_gdscript.cpp
parentfb31283960e0e62df6d7d23955b73d8140809ecb (diff)
parentd26414f9fe62e55af75dd9191ea602c8493640cc (diff)
downloadredot-engine-c456d87ee60ec0609b21ff0476a06efaaae21719.tar.gz
Merge pull request #34918 from vnen/gdscript-assign-op
GDScript: enable type checks on release mode
Diffstat (limited to 'main/tests/test_gdscript.cpp')
-rw-r--r--main/tests/test_gdscript.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp
index 729c5f99cf..a6ef0e9cf4 100644
--- a/main/tests/test_gdscript.cpp
+++ b/main/tests/test_gdscript.cpp
@@ -671,6 +671,30 @@ static void _disassemble_class(const Ref<GDScript> &p_class, const Vector<String
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: {
txt += " cast ";