Files
swift-mirror/test/ModuleInterface/isolated_conformance.swift
Doug Gregor 3380331e7e [SE-0470] Enable isolated conformances by default
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.
2025-04-13 15:41:53 -07:00

22 lines
589 B
Swift

// RUN: %target-swift-frontend -typecheck -swift-version 6 -enable-library-evolution -module-name isolated_conformance -emit-module-interface-path - %s | %FileCheck %s
// REQUIRES: concurrency
public protocol MyProtocol {
func f()
}
@MainActor
public class MyClass { }
// CHECK: extension isolated_conformance.MyClass : @{{.*}}MainActor isolated_conformance.MyProtocol {
extension MyClass: @MainActor MyProtocol {
@MainActor public func f() { }
}
extension MyClass: nonisolated Equatable {
nonisolated public static func ==(lhs: MyClass, rhs: MyClass) -> Bool {
false
}
}