- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathdynamic_actor_isolation.swift
20 lines (16 loc) · 737 Bytes
/
dynamic_actor_isolation.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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
structTestNoErrorsAboutThrows{
structColumn{
@MainActor
init?(_ column:Int){}
}
func test(columns:[Int]){
// MainActor isolation erasure shouldn't interfere with effects checking
_ = columns.compactMap(Column.init) // Ok
}
}