mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This conversion has no effect on `rethrows` checking and should be ignored. Resolves: rdar://142562250
21 lines
737 B
Swift
21 lines
737 B
Swift
// RUN: %target-typecheck-verify-swift -swift-version 5 -strict-concurrency=complete -enable-upcoming-feature DynamicActorIsolation -verify-additional-prefix swift6-
|
||
// RUN: %target-typecheck-verify-swift -swift-version 6 -verify-additional-prefix swift6-
|
||
|
||
// REQUIRES: swift_feature_DynamicActorIsolation
|
||
|
||
// Tests related to DynamicActorIsolation feature
|
||
|
||
// rdar://142562250 - error: call can throw, but it is not marked with ‘try’ and the error is not handled
|
||
@MainActor
|
||
struct TestNoErrorsAboutThrows {
|
||
struct Column {
|
||
@MainActor
|
||
init?(_ column: Int) {}
|
||
}
|
||
|
||
func test(columns: [Int]) {
|
||
// MainActor isolation erasure shouldn't interfere with effects checking
|
||
_ = columns.compactMap(Column.init) // Ok
|
||
}
|
||
}
|