diff options
| author | Yuri Sizov <yuris@humnom.net> | 2023-07-31 21:01:03 +0200 |
|---|---|---|
| committer | Yuri Sizov <yuris@humnom.net> | 2023-07-31 21:01:03 +0200 |
| commit | efbff1369a9eb366667c1d641ed6c853bdd8c830 (patch) | |
| tree | 3ac78c2686e32250cc4b2cdf413a95fb4fa5c288 /modules/gdscript/tests/scripts | |
| parent | 62b4643d854755b36d7c7ace0047d7a40e812f1a (diff) | |
| parent | bf8f996212323e37c81432dd7268a3bd448dceed (diff) | |
| download | redot-engine-efbff1369a9eb366667c1d641ed6c853bdd8c830.tar.gz | |
Merge pull request #78254 from dalexeev/gds-fix-property-group-name-conflict
GDScript: Fix conflict between property and group names
Diffstat (limited to 'modules/gdscript/tests/scripts')
2 files changed, 22 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd new file mode 100644 index 0000000000..e46f24cc5f --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd @@ -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) diff --git a/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out new file mode 100644 index 0000000000..96ae84e986 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out @@ -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 } |
