mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
These tests of the type system are being updated because of the new presence of Copyable and Escapable conformances & conformance requirements.
22 lines
524 B
Swift
22 lines
524 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 {{circular reference}}
|
|
|
|
extension Never: Q, P { // expected-note 2{{through reference here}}
|
|
public typealias A = Never
|
|
public static func f() -> Any? { nil }
|
|
}
|
|
|
|
extension Q { // expected-note {{through reference here}}
|
|
public var b: Never { fatalError() } // expected-note 4{{through reference here}}
|
|
}
|
|
|