Files
swift-mirror/test/NameLookup/rdar163961797.swift
Hamish Knight f2b0b92dc1 [Sema] Avoid member attribute cycle in ResolveMacroRequest
If we have a custom attribute on a type that does a qualified lookup
into the same type, we need to be able to expand member attribute
macros for that type. As such, the check to see if we already have
a nominal for the attribute would hit a cycle. Limit this check such
that it only applies to local vars, which is the only case where it
actually matters.

rdar://163961797
2025-11-06 19:33:09 +00:00

11 lines
287 B
Swift

// RUN: %target-typecheck-verify-swift
// Make sure we don't end up with a request cycle here, since looking up 'S.Actor'
// requires expanding member attribute macros for 'S'.
@S.Actor
struct S {
@globalActor actor Actor: GlobalActor {
public static let shared = S.Actor()
}
}