// {"kind":"typecheck","original":"0fdef466","signature":"(anonymous namespace)::ExprRewriter::finishApply(swift::ApplyExpr*, swift::Type, swift::constraints::ConstraintLocatorBuilder, swift::constraints::ConstraintLocatorBuilder)","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast","signatureNext":"ExprRewriter::visitApplyExpr"}
// RUN: not --crash %target-swift-frontend -typecheck %s
protocol a func b(c : a) { _openExistential(c do: b
