Skip to content

Commit 6d37167

Browse files
authored
Merge pull request #37141 from CodaFi/heaven-send
Don't Force the Interface Type While Checking Isolation
2 parents c236f85 + 847930b commit 6d37167

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2558,7 +2558,8 @@ static Optional<ActorIsolation> getIsolationFromConformances(
25582558
return None;
25592559

25602560
Optional<ActorIsolation> foundIsolation;
2561-
for (auto proto : nominal->getLocalProtocols()) {
2561+
for (auto proto :
2562+
nominal->getLocalProtocols(ConformanceLookupKind::NonStructural)) {
25622563
switch (auto protoIsolation = getActorIsolation(proto)) {
25632564
case ActorIsolation::ActorInstance:
25642565
case ActorIsolation::Unspecified:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
struct Foo {
2+
static let member = Bar()
3+
}

test/Concurrency/sendable_cycle.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// RUN: %target-typecheck-verify-swift %S/Inputs/sendable_cycle_other.swift -enable-experimental-concurrency
2+
// REQUIRES: concurrency
3+
4+
struct Bar {
5+
lazy var foo = {
6+
self.x()
7+
}
8+
9+
func x() -> Int { 42 }
10+
}

test/Sema/option-set-empty.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown
22

33
struct SomeOptions: OptionSet {
4-
// expected-error@-1{{circular reference}}
5-
// expected-note@-2 2{{through reference here}}
64
var rawValue: Int
75

86
static let some = MyOptions(rawValue: 4)
@@ -12,7 +10,6 @@ struct SomeOptions: OptionSet {
1210
let someVal = MyOptions(rawValue: 6)
1311
let option = MyOptions(float: Float.infinity)
1412
let none = SomeOptions(rawValue: 0) // expected-error {{value type 'SomeOptions' cannot have a stored property that recursively contains it}}
15-
// expected-note@-1 3{{through reference here}}
1613
}
1714

1815
struct MyOptions: OptionSet {

0 commit comments

Comments
 (0)