summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts/runtime/features/constants_are_read_only.gd
blob: d1746979beb7731bd3941c3f10c83d52fba54d1a (plain)
1
2
3
4
5
6
7
8
9
10
const array: Array = [0]
const dictionary := {1: 2}

@warning_ignore("assert_always_true")
func test():
	assert(array.is_read_only() == true)
	assert(str(array) == '[0]')
	assert(dictionary.is_read_only() == true)
	assert(str(dictionary) == '{ 1: 2 }')
	print('ok')