summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts/runtime/features/typed_assignment.gd
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/tests/scripts/runtime/features/typed_assignment.gd')
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/typed_assignment.gd9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/typed_assignment.gd b/modules/gdscript/tests/scripts/runtime/features/typed_assignment.gd
new file mode 100644
index 0000000000..22e54cf91c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/typed_assignment.gd
@@ -0,0 +1,9 @@
+func test():
+ var x: int = 2
+ var y = 3.14
+ var z := 2.72
+ print(typeof(x))
+ x = y
+ print(typeof(x))
+ x = z
+ print(typeof(x))