Merge pull request #71051 from vonagam/consts-are-deep-start
GDScript: Begin making constants deep, not shallow or flat
This commit is contained in:
commit
d3fc9d9e41
16 changed files with 82 additions and 36 deletions
|
|
@ -0,0 +1,5 @@
|
|||
const array: Array = [0]
|
||||
|
||||
func test():
|
||||
var key: int = 0
|
||||
array[key] = 0
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_ANALYZER_ERROR
|
||||
Cannot assign a new value to a constant.
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
const dictionary := {}
|
||||
|
||||
func test():
|
||||
var key: int = 0
|
||||
dictionary[key] = 0
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_ANALYZER_ERROR
|
||||
Cannot assign a new value to a constant.
|
||||
Loading…
Add table
Add a link
Reference in a new issue