mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
22 lines
485 B
Swift
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}}
|
|
}
|
|
|