mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The payload is stored maximally-abstracted, so make sure we respect that to avoid a crash when the 'async let' binding has a function type. Fixes rdar://114823719.
13 lines
267 B
Swift
13 lines
267 B
Swift
// RUN: %target-swift-frontend -emit-silgen %s -disable-availability-checking
|
|
// REQUIRES: concurrency
|
|
|
|
public func callee() async -> (() -> ()) {
|
|
fatalError()
|
|
}
|
|
|
|
public func caller() async {
|
|
async let future = callee()
|
|
let result = await future
|
|
result()
|
|
}
|