diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-18 16:27:42 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-18 16:27:42 +0200 |
| commit | 4db1d09bf5a9302b5ea4651c8be6a1f1e7bf4ba8 (patch) | |
| tree | eedc0718cec644a481e0e424faa2924ed739b003 /modules/gdscript/tests/scripts | |
| parent | 1ce2425c0efe2c8ce245d62adb3001040e44d0ab (diff) | |
| parent | b39b4010bd49b3b3c691850e5020f1b80b069654 (diff) | |
| download | redot-engine-4db1d09bf5a9302b5ea4651c8be6a1f1e7bf4ba8.tar.gz | |
Merge pull request #73657 from mashumafi/callable-ctor
Fix: Get constructor as Callable
Diffstat (limited to 'modules/gdscript/tests/scripts')
| -rw-r--r-- | modules/gdscript/tests/scripts/runtime/features/ctor_as_callable.gd | 10 | ||||
| -rw-r--r-- | modules/gdscript/tests/scripts/runtime/features/ctor_as_callable.out | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/ctor_as_callable.gd b/modules/gdscript/tests/scripts/runtime/features/ctor_as_callable.gd new file mode 100644 index 0000000000..515efbc9ce --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/ctor_as_callable.gd @@ -0,0 +1,10 @@ +# https://github.com/godotengine/godot/issues/70319 + +class InnerClass: + pass + +func test(): + var inner_ctor : Callable = InnerClass.new + print(inner_ctor) + var native_ctor : Callable = Node.new + print(native_ctor) diff --git a/modules/gdscript/tests/scripts/runtime/features/ctor_as_callable.out b/modules/gdscript/tests/scripts/runtime/features/ctor_as_callable.out new file mode 100644 index 0000000000..527e3e8f84 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/ctor_as_callable.out @@ -0,0 +1,3 @@ +GDTEST_OK +GDScript::new +GDScriptNativeClass::new |
