mirror of
https://github.com/apple/swift.git
synced 2026-10-14 15:51:20 +02:00
When the type named in a `throws(...)` clause fails to resolve, the effective thrown error type of the declaration is an error type, which tripped an assertion in `Classification::forThrows()`. Errors were already diagnosed by that point, so classify the reference as invalid code instead. Resolves rdar://186881939 and https://github.com/swiftlang/swift/issues/92053.
7 lines
636 B
Swift
7 lines
636 B
Swift
// {"kind":"typecheck","original":"99a66dd3","signature":"(anonymous namespace)::ApplyClassifier::classifyApply(swift::ApplyExpr*, (anonymous namespace)::AbstractFunction const&, swift::Expr*, swift::AnyFunctionType const*, swift::ArgumentList*, bool, bool, llvm::DenseSet<swift::Expr const*, llvm::DenseMapInfo<swift::Expr const*, void>>*)::'lambda'(swift::EffectKind)::operator()(swift::EffectKind) const","signatureAssert":"Assertion failed: (!thrownError->hasError()), function forThrows","signatureNext":"CheckEffectsCoverage::checkApply"}
|
|
// RUN: not %target-swift-frontend -typecheck %s
|
|
struct a: AsyncSequence {
|
|
b {
|
|
max
|
|
}
|