Files
swift-mirror/test/Generics/rdar123013710.swift
Kavon Farvardin 102ccbc70b Test: updates for NoncopyableGenerics
These tests of the type system are being updated because of the new
presence of Copyable and Escapable conformances & conformance
requirements.
2024-03-14 23:10:44 -07:00

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}}
}