diff options
author | Dmitrii Maganov <vonagam@gmail.com> | 2022-12-29 21:48:04 +0200 |
---|---|---|
committer | Dmitrii Maganov <vonagam@gmail.com> | 2022-12-29 22:04:13 +0200 |
commit | 056066ee95a62291806a908e9fb634533f2222e0 (patch) | |
tree | 44e8b2ba8f0740d69be7d6ce1c1e12d0c761ea28 /modules/gdscript/tests/scripts/parser/features | |
parent | a75493091823020d858fabadbfa5994da0d658cb (diff) |
GDScript: Fix false name conflicts for unnamed enums
Diffstat (limited to 'modules/gdscript/tests/scripts/parser/features')
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/unnamed_enums_outer_conflicts.gd | 17 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/unnamed_enums_outer_conflicts.out | 5 |
2 files changed, 22 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/features/unnamed_enums_outer_conflicts.gd b/modules/gdscript/tests/scripts/parser/features/unnamed_enums_outer_conflicts.gd new file mode 100644 index 0000000000..4cbb464f59 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/unnamed_enums_outer_conflicts.gd @@ -0,0 +1,17 @@ +class A: + enum { X = 1 } + + class B: + enum { X = 2 } + +class C: + const X = 3 + + class D: + enum { X = 4 } + +func test(): + print(A.X) + print(A.B.X) + print(C.X) + print(C.D.X) diff --git a/modules/gdscript/tests/scripts/parser/features/unnamed_enums_outer_conflicts.out b/modules/gdscript/tests/scripts/parser/features/unnamed_enums_outer_conflicts.out new file mode 100644 index 0000000000..7536c38490 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/unnamed_enums_outer_conflicts.out @@ -0,0 +1,5 @@ +GDTEST_OK +1 +2 +3 +4 |