Merge pull request #71051 from vonagam/consts-are-deep-start

GDScript: Begin making constants deep, not shallow or flat
This commit is contained in:
Rémi Verschelde 2023-01-09 23:22:59 +01:00 committed by GitHub
commit d3fc9d9e41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 82 additions and 36 deletions

View file

@ -0,0 +1,5 @@
const array: Array = [0]
func test():
var key: int = 0
array[key] = 0

View file

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Cannot assign a new value to a constant.

View file

@ -0,0 +1,5 @@
const dictionary := {}
func test():
var key: int = 0
dictionary[key] = 0

View file

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Cannot assign a new value to a constant.