summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/analyzer/errors
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-07-31 21:01:36 +0200
committerYuri Sizov <yuris@humnom.net>2023-07-31 21:01:36 +0200
commit3de7dd902c3b491b92cad822eb1ce7018001c24b (patch)
tree29ac72747d9bb8ac089ad7a05842676861e97901 /modules/gdscript/tests/scripts/analyzer/errors
parent8b12849fef2059421583e4e5bf2a27f654d8ab42 (diff)
parentd53fc92b4c6b5e4484e8f0bfff6ac55163dde3fb (diff)
downloadredot-engine-3de7dd902c3b491b92cad822eb1ce7018001c24b.tar.gz
Merge pull request #79880 from dalexeev/gds-fix-id-shadowing-below
GDScript: Fix bug with identifier shadowed below in current scope
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer/errors')
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.gd4
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.out2
2 files changed, 6 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.gd b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.gd
new file mode 100644
index 0000000000..57ae41922f
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.gd
@@ -0,0 +1,4 @@
+var v1 = v1
+
+func test():
+ print(v1)
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.out b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.out
new file mode 100644
index 0000000000..c337882d9c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Could not resolve member "v1": Cyclic reference.