Files
swift-mirror/validation-test/compiler_crashers_2_fixed/issue-63997.swift
Slava Pestov 2f4ed5a949 Sema: Clean up diagnoseMissingOwnership()
- Pass down the TypeResolution instance so we can get the generic
  signature. This ensures we always use the correct signature in
  SIL mode.

- Don't diagnose if the type contains error types.
2024-02-29 18:13:28 -05:00

14 lines
333 B
Swift

// RUN: %target-typecheck-verify-swift
protocol P {
associatedtype A
}
struct J<A> { }
// expected-error@+2 {{same-type constraint 'Self' == 'J<Self.A>' is recursive}}
// expected-error@+1 {{no type for 'Self' can satisfy both 'Self == J<Self.A>' and 'Self : P'}}
extension P where Self == J<A> {
static func just(_: A) { }
}