Files
swift-mirror/test/Generics/rdar123013710.swift
Hamish Knight 13023de4c4 [Evaluator] Avoid emitting duplicate "through reference here" notes
Filter out any duplicate notes to help cut down on the noise for
request cycle diagnostics. Some of the note locations here still aren't
great, but this at least stops us from repeating them for each
intermediate request.
2025-10-05 20:48:08 +01:00

22 lines
485 B
Swift

// RUN: %target-typecheck-verify-swift
public protocol P {
associatedtype A
associatedtype B: P
var b: B { get }
static func f() -> Any?
}
protocol Q: P where B == Never {} // expected-error@:10 {{circular reference}}
extension Never: Q, P { // expected-note@:1 {{through reference here}}
public typealias A = Never
public static func f() -> Any? { nil }
}
extension Q {
public var b: Never { fatalError() } // expected-note {{through reference here}}
}