Files
swift-mirror/test/SILGen/async_let_reabstraction.swift
Slava Pestov 583c51ae87 SILGen: Use the right abstraction pattern when loading 'async let' result
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.
2023-09-08 17:41:42 -04:00

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()
}