godot/modules/gdscript/tests/scripts/parser/warnings/assert_always_true.gd

6 lines
140 B
GDScript

func test():
# These statements always evaluate to `true`, and therefore emit a warning.
assert(true)
assert(-1.234)
assert(2 + 3 == 5)