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
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
4 changed files with 29 additions and 4 deletions

View file

@ -749,7 +749,9 @@ public:
members.push_back(Member(p_enum_value));
}
void add_member_group(AnnotationNode *p_annotation_node) {
members_indices[p_annotation_node->export_info.name] = members.size();
// Avoid name conflict. See GH-78252.
StringName name = vformat("@group_%d_%s", members.size(), p_annotation_node->export_info.name);
members_indices[name] = members.size();
members.push_back(Member(p_annotation_node));
}