mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We sometimes mangle SILFunctionTypes when generating debug info for reabstraction thunks, and these can have various exotic parameter and result attributes. Two recent additions were never plumbed through the mangler, causing assertion failures when emitting debug info. Fixes rdar://153730847.
16 lines
414 B
Swift
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 }
|
|
}
|
|
}
|