Files
godot/modules/gdscript/tests/scripts/analyzer/features/constants_from_parent.gd
noahbackus 9d30169a8d
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
initial commit, 4.5 stable
2025-09-16 20:46:46 -04:00

17 lines
412 B
GDScript

extends Node
const NO_TYPE_CONST = 0
const TYPE_CONST: int = 1
const GUESS_TYPE_CONST := 2
class Test:
var a = NO_TYPE_CONST
var b = TYPE_CONST
var c = GUESS_TYPE_CONST
func test():
var test_instance = Test.new()
prints("a", test_instance.a, test_instance.a == NO_TYPE_CONST)
prints("b", test_instance.b, test_instance.b == TYPE_CONST)
prints("c", test_instance.c, test_instance.c == GUESS_TYPE_CONST)