summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/analyzer/features/enums_in_range_call.gd
blob: d2d9d04508c08d5090fcea4d7b9021480b1b1bd1 (plain)
1
2
3
4
5
6
7
8
9
enum E { E0 = 0, E3 = 3 }

func test():
	var total := 0
	for value in range(E.E0, E.E3):
		var inferable := value
		total += inferable
	assert(total == 0 + 1 + 2)
	print('ok')