Files
swift-mirror/test/Concurrency/dynamic_actor_isolation.swift
Pavel Yaskevich f9d34984c6 [Sema] Look through ActorIsolationErasureExpr when finding function DeclRefs for rethrows checking.
This conversion has no effect on `rethrows` checking and should
be ignored.

Resolves: rdar://142562250
2025-01-10 09:04:50 -08:00

21 lines
737 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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
}
}