summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts/analyzer/features/constants_from_parent.gd
blob: 135b6c3d85a77bc26aa9869550fd5cc1035d635b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)