Debian Codegraph @

modules/gdscript/tests/scripts/parser/errors/invalid_ternary_operator.gd

raw
1 func test():
2 var amount = 50
3 # C-style ternary operator is invalid in GDScript.
4 # The valid syntax is `"yes" if amount < 60 else "no"`, like in Python.
5 var ternary = amount < 60 ? "yes" : "no"