-
-
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 #78254 from dalexeev/gds-fix-property-group-name-c…
…onflict GDScript: Fix conflict between property and group names
- Loading branch information
Showing
4 changed files
with
29 additions
and
4 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
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
17 changes: 17 additions & 0 deletions
17
.../gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.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,17 @@ | ||
extends RefCounted # TODO: Fix standalone annotations parsing. | ||
|
||
# GH-73843 | ||
@export_group("Resource") | ||
|
||
# GH-78252 | ||
@export var prop_1: int | ||
@export_category("prop_1") | ||
@export var prop_2: int | ||
|
||
func test(): | ||
var resource := Resource.new() | ||
prints("Not shadowed:", resource.get_class()) | ||
|
||
for property in get_property_list(): | ||
if property.name in ["prop_1", "prop_2"]: | ||
print(property) |
5 changes: 5 additions & 0 deletions
5
...gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.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 | ||
Not shadowed: Resource | ||
{ "name": "prop_1", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 } | ||
{ "name": "prop_1", "class_name": &"", "type": 0, "hint": 0, "hint_string": "", "usage": 128 } | ||
{ "name": "prop_2", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 } |