mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The IsolatedConformances feature moves to a normal, supported feature.
Remove all of the experimental-feature flags on test cases and such.
The InferIsolatedConformances feature moves to an upcoming feature for
Swift 7. This should become an adoptable feature, adding "nonisolated"
where needed.
(cherry picked from commit 3380331e7e)
16 lines
616 B
Swift
16 lines
616 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -emit-module -target %target-swift-5.1-abi-triple -swift-version 6 -o %t/def_isolated_conformance.swiftmodule %S/Inputs/def_isolated_conformance.swift
|
|
|
|
// RUN: %target-swift-frontend -typecheck -verify -target %target-swift-5.1-abi-triple -swift-version 6 %s -I %t
|
|
|
|
// REQUIRES: concurrency
|
|
|
|
import def_isolated_conformance
|
|
|
|
func acceptMyProtocol(_: some MyProtocol) { }
|
|
|
|
nonisolated func f(mc: MyClass) {
|
|
acceptMyProtocol(mc)
|
|
// expected-error@-1{{main actor-isolated conformance of 'MyClass' to 'MyProtocol' cannot be used in nonisolated context}}
|
|
}
|