File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -468,6 +468,10 @@ class AbstractFunction {
468468 // Look through optional evaluations.
469469 } else if (auto optionalEval = dyn_cast<OptionalEvaluationExpr>(fn)) {
470470 fn = optionalEval->getSubExpr ()->getValueProvidingExpr ();
471+ // Look through actor isolation erasures.
472+ } else if (auto actorIsolationErasure =
473+ dyn_cast<ActorIsolationErasureExpr>(fn)) {
474+ fn = actorIsolationErasure->getSubExpr ()->getValueProvidingExpr ();
471475 } else {
472476 break ;
473477 }
Original file line number Diff line number Diff line change 1+ // RUN: %target-typecheck-verify-swift -swift-version 5 -strict-concurrency=complete -enable-upcoming-feature DynamicActorIsolation -verify-additional-prefix swift6-
2+ // RUN: %target-typecheck-verify-swift -swift-version 6 -verify-additional-prefix swift6-
3+
4+ // REQUIRES: swift_feature_DynamicActorIsolation
5+
6+ // Tests related to DynamicActorIsolation feature
7+
8+ // rdar://142562250 - error: call can throw, but it is not marked with ‘try’ and the error is not handled
9+ @MainActor
10+ struct TestNoErrorsAboutThrows {
11+ struct Column {
12+ @MainActor
13+ init ? ( _ column: Int ) { }
14+ }
15+
16+ func test( columns: [ Int ] ) {
17+ // MainActor isolation erasure shouldn't interfere with effects checking
18+ _ = columns. compactMap ( Column . init) // Ok
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments