File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -165,11 +165,6 @@ void swift::diagnoseUnsafeUse(const UnsafeUse &use) {
165165// / Determine whether a reference to the given variable is treated as
166166// / nonisolated(unsafe).
167167static bool isReferenceToNonisolatedUnsafe (ValueDecl *decl) {
168- auto isolation = getActorIsolationForReference (
169- decl, decl->getDeclContext ());
170- if (!isolation.isNonisolated ())
171- return false ;
172-
173168 auto attr = decl->getAttrs ().getAttribute <NonisolatedAttr>();
174169 return attr && attr->isUnsafe ();
175170}
Original file line number Diff line number Diff line change @@ -43,3 +43,15 @@ final class MyExecutor: SerialExecutor {
4343 func enqueue( _ job: consuming ExecutorJob ) { fatalError ( " boom " ) }
4444 @unsafe func asUnownedSerialExecutor( ) -> UnownedSerialExecutor { fatalError ( " boom " ) }
4545}
46+
47+ // Ensure that this does not cause a reference cycle.
48+ public struct TokenSyntax { }
49+ public struct Syntax { }
50+
51+ open class SyntaxVisitor {
52+ open func visit( _ token: TokenSyntax ) { }
53+ }
54+
55+ open class SyntaxAnyVisitor : SyntaxVisitor {
56+ override open func visit( _ token: TokenSyntax ) { }
57+ }
You can’t perform that action at this time.
0 commit comments