mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Merge pull request #71051 from vonagam/consts-are-deep-start
GDScript: Begin making constants deep, not shallow or flat
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user