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
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.