diff options
author | George Marques <george@gmarqu.es> | 2021-10-15 10:40:50 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2021-10-15 10:40:50 -0300 |
commit | 540821a264976b7295d2b32d9298992d00f1a17e (patch) | |
tree | baf497fe87b058bbd45e69546b8f2a9ad19d4204 /modules/gdscript/tests/scripts/analyzer/features | |
parent | 342c1bf1e25348232af709edf90d16358b7b62c9 (diff) |
GDScript: Fix inferred typed array marked as constant
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer/features')
2 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/features/typed_array_inferred_access_isnt_constant.gd b/modules/gdscript/tests/scripts/analyzer/features/typed_array_inferred_access_isnt_constant.gd new file mode 100644 index 0000000000..55c40cb971 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/typed_array_inferred_access_isnt_constant.gd @@ -0,0 +1,6 @@ +# https://github.com/godotengine/godot/issues/53640 + +func test(): + var arr := [0] + arr[0] = 1 + print(arr[0]) diff --git a/modules/gdscript/tests/scripts/analyzer/features/typed_array_inferred_access_isnt_constant.out b/modules/gdscript/tests/scripts/analyzer/features/typed_array_inferred_access_isnt_constant.out new file mode 100644 index 0000000000..a7f1357bb2 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/typed_array_inferred_access_isnt_constant.out @@ -0,0 +1,2 @@ +GDTEST_OK +1 |