-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80510 from dalexeev/gds-fix-access-inner-class-fr…
…om-inside GDScript: Fix "Identifier not found" error when accessing inner class from inside
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
modules/gdscript/tests/scripts/analyzer/features/inner_class_access_from_inside.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
5 changes: 5 additions & 0 deletions
5
modules/gdscript/tests/scripts/analyzer/features/inner_class_access_from_inside.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
GDTEST_OK | ||
true | ||
true | ||
true | ||
true |