diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-08-14 15:28:57 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-08-14 15:28:57 +0200 |
| commit | 6b5e44f3ca1664448c1ecc185a1a03efe557b2e9 (patch) | |
| tree | 6fc7fbb073e2c611f877ad3fc7b1195a219f3ce7 /modules/gdscript/tests | |
| parent | 0308422f461dce11339896249e23ff02d978bfa0 (diff) | |
| parent | fb45cab133103de4f641cc72a553a28463bed7fd (diff) | |
| download | redot-engine-6b5e44f3ca1664448c1ecc185a1a03efe557b2e9.tar.gz | |
Merge pull request #80510 from dalexeev/gds-fix-access-inner-class-from-inside
GDScript: Fix "Identifier not found" error when accessing inner class from inside
Diffstat (limited to 'modules/gdscript/tests')
| -rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/inner_class_access_from_inside.gd | 21 | ||||
| -rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/inner_class_access_from_inside.out | 5 |
2 files changed, 26 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/features/inner_class_access_from_inside.gd b/modules/gdscript/tests/scripts/analyzer/features/inner_class_access_from_inside.gd new file mode 100644 index 0000000000..51c589b8e0 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/inner_class_access_from_inside.gd @@ -0,0 +1,21 @@ +# GH-80508 + +class A: + func a(): + return A.new() + func b(): + return B.new() + +class B: + func a(): + return A.new() + func b(): + return B.new() + +func test(): + var a := A.new() + var b := B.new() + print(a.a() is A) + print(a.b() is B) + print(b.a() is A) + print(b.b() is B) diff --git a/modules/gdscript/tests/scripts/analyzer/features/inner_class_access_from_inside.out b/modules/gdscript/tests/scripts/analyzer/features/inner_class_access_from_inside.out new file mode 100644 index 0000000000..f9783e4362 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/inner_class_access_from_inside.out @@ -0,0 +1,5 @@ +GDTEST_OK +true +true +true +true |
