Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0159-rdar40009245.swift
Slava Pestov 70c9f8a47e RequirementMachine: Leave behind conflicting requirements in the minimized signature
Requirement lowering only expects that it won't see two requirements
of the same kind (except for conformance requirements). So only mark
those as conflicting.

This addresses a crash-on-invalid and improves diagnostics for
move-only generics, because a conflict won't drop the copyability
of a generic parameter and expose a move-only-naive user to
confusing error messages.

Fixes #61031.
Fixes #63997.
Fixes rdar://problem/111991454.
2024-02-15 14:32:31 -05:00

8 lines
267 B
Swift

// RUN: %target-typecheck-verify-swift
protocol P {
associatedtype A : P where A.X == Self
associatedtype X : P where P.A == Self
// expected-error@-1{{cannot access associated type 'A' from 'P'; use a concrete type or generic parameter base instead}}
}