Open
Description
Description
The following code causes the compiler to crash:
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public struct MakeExplode<Element, Source: Sequence> where Source.Element == () async -> Element {}
Steps to reproduce
Add the above code to a file in a Swift package and attempt to compile. The essential part seems to be the constraint to an async
function whose return type is another type parameter (removing async
or replacing Element
with a specific type like Int
avoids the crash).
Expected behavior
The code should either compile or trigger a compile error, but not a crash.
Environment
- Swift compiler version info:
swift-driver version: 1.75.2 Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) Target: x86_64-apple-macosx13.0
- Xcode version info:
Xcode 14.3.1 Build version 14E300c
- Deployment target: macOS 10.13, iOS 11
Stack trace: