Files
swift-mirror/test/DebugInfo/nonisolated_nonsending.swift
2025-08-22 15:31:47 -07:00

16 lines
414 B
Swift

// RUN: %target-swift-frontend -emit-ir -g %s -swift-version 6 -enable-upcoming-feature NonisolatedNonsendingByDefault
// REQUIRES: swift_feature_NonisolatedNonsendingByDefault
public protocol P: Sendable {
func f(_: Int) async
}
public struct S: Sendable {
public func f(p: [any P]) async {
let x: [@Sendable (Int) async -> ()] = p.map { $0.f }
// FIXME: crashes
//let y = p.map { $0.f }
}
}