mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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
11 lines
287 B
Swift
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()
|
|
}
|
|
}
|