summaryrefslogtreecommitdiffstats
path: root/test/project
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2023-09-21 15:07:05 -0500
committerGitHub <noreply@github.com>2023-09-21 15:07:05 -0500
commit4314f91b7dc23d930506f52d3a3c88fae0f5d57d (patch)
tree82888e3779b6198e395b59b2f31a715aa536bc6e /test/project
parentdb15731e4d2af5510a9c9310c7fd71813d1dd9c7 (diff)
parentca3e25de040c87de1a9bb332c62cfaef0d44fe75 (diff)
downloadredot-cpp-4314f91b7dc23d930506f52d3a3c88fae0f5d57d.tar.gz
Merge pull request #1238 from dsnopek/variant-call-callp
Fix variant call compiler error (alternate)
Diffstat (limited to 'test/project')
-rw-r--r--test/project/main.gd7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/project/main.gd b/test/project/main.gd
index 715b13e..dbc60f8 100644
--- a/test/project/main.gd
+++ b/test/project/main.gd
@@ -2,6 +2,9 @@ extends "res://test_base.gd"
var custom_signal_emitted = null
+class TestClass:
+ func test(p_msg: String) -> String:
+ return p_msg + " world"
func _ready():
var example: Example = $Example
@@ -144,6 +147,10 @@ func _ready():
assert_equal(new_tilemap.tile_set, new_tileset)
new_tilemap.queue_free()
+ # Test variant call.
+ var test_obj = TestClass.new()
+ assert_equal(example.test_variant_call(test_obj), "hello world")
+
# Constants.
assert_equal(Example.FIRST, 0)
assert_equal(Example.ANSWER_TO_EVERYTHING, 42)