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) {
165
165
// / Determine whether a reference to the given variable is treated as
166
166
// / nonisolated(unsafe).
167
167
static bool isReferenceToNonisolatedUnsafe (ValueDecl *decl) {
168
- auto isolation = getActorIsolationForReference (
169
- decl, decl->getDeclContext ());
170
- if (!isolation.isNonisolated ())
171
- return false ;
172
-
173
168
auto attr = decl->getAttrs ().getAttribute <NonisolatedAttr>();
174
169
return attr && attr->isUnsafe ();
175
170
}
Original file line number Diff line number Diff line change @@ -43,3 +43,15 @@ final class MyExecutor: SerialExecutor {
43
43
func enqueue( _ job: consuming ExecutorJob ) { fatalError ( " boom " ) }
44
44
@unsafe func asUnownedSerialExecutor( ) -> UnownedSerialExecutor { fatalError ( " boom " ) }
45
45
}
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