summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts/parser/warnings/integer_division.gd
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/tests/scripts/parser/warnings/integer_division.gd')
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/integer_division.gd10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/warnings/integer_division.gd b/modules/gdscript/tests/scripts/parser/warnings/integer_division.gd
new file mode 100644
index 0000000000..6117425528
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/integer_division.gd
@@ -0,0 +1,10 @@
+func test():
+ # This should emit a warning.
+ var __ = 5 / 2
+
+ # These should not emit warnings.
+ __ = float(5) / 2
+ __ = 5 / float(2)
+ __ = 5.0 / 2
+ __ = 5 / 2.0
+ __ = 5.0 / 2.0