Files
swift-mirror/validation-test/compiler_crashers_fixed/ConstraintSystem-compareSolutions-dcf902.swift
Slava Pestov 6a2784f87a Sema: Reject one-element tuples in checkTypeOfBinding()
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.
2026-06-29 22:12:32 -04:00

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