Skip to content

Commit e77e7d8

Browse files
authored
Merge pull request #37142 from CodaFi/insert-send-rights
2 parents 188b87d + 38f952e commit e77e7d8

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
@@ -2597,7 +2597,8 @@ static Optional<ActorIsolation> getIsolationFromConformances(
25972597
return None;
25982598

25992599
Optional<ActorIsolation> foundIsolation;
2600-
for (auto proto : nominal->getLocalProtocols()) {
2600+
for (auto proto :
2601+
nominal->getLocalProtocols(ConformanceLookupKind::NonStructural)) {
26012602
switch (auto protoIsolation = getActorIsolation(proto)) {
26022603
case ActorIsolation::ActorInstance:
26032604
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)