godot/modules/gdscript/tests/scripts/analyzer/errors/constant_collections.gd

7 lines
134 B
GDScript

const ARRAY: Array = [0]
const DICTIONARY: Dictionary = { 0: 0 }
func test():
var key: int = 0
ARRAY[key] = 0
DICTIONARY[key] = 0