Debian Codegraph @

modules/gdscript/tests/scripts/analyzer/features/constants_from_parent.gd

raw
1 extends Node
2
3 const NO_TYPE_CONST = 0
4 const TYPE_CONST: int = 1
5 const GUESS_TYPE_CONST := 2
6
7 class Test:
8 var a = NO_TYPE_CONST
9 var b = TYPE_CONST
10 var c = GUESS_TYPE_CONST
11
12 func test():
13 var test_instance = Test.new()
14 prints("a", test_instance.a, test_instance.a == NO_TYPE_CONST)
15 prints("b", test_instance.b, test_instance.b == TYPE_CONST)
16 prints("c", test_instance.c, test_instance.c == GUESS_TYPE_CONST)