Fix qualification of enum values in template specialization args (#56070)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56070

Changelog: [Internal]

Fixes qualification of unscoped enum values used as template specialization arguments.

Reviewed By: cipolleschi

Differential Revision: D96279462

fbshipit-source-id: d151b069124b352451964a31da0385744d21013f
This commit is contained in:
Dawid Małecki authored and meta-codesync[bot] committed 2026-03-18 09:29:02 -07:00
1 parent d0ec2956f8
commit 248d38e5c1
3 files changed
+57 -1

No files matched your search

+6 -1
View File
@@ -396,8 +396,13 @@ class Scope(Generic[ScopeKindT]):
elif any(
m.name == base_name and not isinstance(m, FriendMember)
for m in current_scope._members
) or any(
any(m.name == base_name for m in inner._members)
for inner in current_scope.inner_scopes.values()
if isinstance(inner.kind, EnumScopeKind)
):
# Found as a member, assume following segments exist in the scope
# Found as a member (or as an unscoped enum value accessible
# from the parent scope), assume following segments exist
prefix = "::".join(matched_segments)
suffix = "::".join(path[i:])
anchor_prefix = anchor_scope.get_qualified_name()