mirror of
https://github.com/apple/swift.git
synced 2026-10-22 19:15:50 +02:00
With parameter packs, we might get a constraint like (_: $T0) conv $T1, but we don't want to bind $T1 to (_: $T0), it will fail. This is needed to avoid regressions once we start promoting more Supertype bindings to Exact.
7 lines
586 B
Swift
7 lines
586 B
Swift
// {"kind":"typecheck","original":"2e9096bf","signature":"swift::constraints::ConstraintSystem::compareSolutions(swift::constraints::ConstraintSystem&, llvm::ArrayRef<swift::constraints::Solution>, swift::constraints::SolutionDiff const&, unsigned int, unsigned int)","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast","signatureNext":"ConstraintSystem::findBestSolution"}
|
|
// RUN: not %target-swift-frontend -typecheck %s
|
|
extension Sequence {
|
|
b<c, d: KeyPath<Element, c>>(d )
|
|
{
|
|
[(a:2), (0.0 a : 1)].b(\.a
|