1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

GDScript: Fix conflict between property and group names

This commit is contained in:
Danil Alexeev
2023-06-15 08:02:42 +03:00
parent 33957aee69
commit bf8f996212
4 changed files with 29 additions and 4 deletions

View File

@@ -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)

View File

@@ -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 }