diff options
Diffstat (limited to 'modules/gdscript/tests/scripts/parser-features/variable-declaration.gd')
-rw-r--r-- | modules/gdscript/tests/scripts/parser-features/variable-declaration.gd | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser-features/variable-declaration.gd b/modules/gdscript/tests/scripts/parser-features/variable-declaration.gd new file mode 100644 index 0000000000..3b48f10ca7 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser-features/variable-declaration.gd @@ -0,0 +1,12 @@ +var a # No init. +var b = 42 # Init. + +func test(): + var c # No init, local. + var d = 23 # Init, local. + + a = 1 + c = 2 + + prints(a, b, c, d) + print("OK") |