mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
16 lines
455 B
Swift
16 lines
455 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
protocol Base { // expected-note {{'Base' previously declared here}}
|
|
// expected-note@-1 {{found this candidate}}
|
|
associatedtype E
|
|
}
|
|
|
|
struct Base<T> {} // expected-error {{invalid redeclaration of 'Base'}}
|
|
// expected-note@-1 {{found this candidate}}
|
|
|
|
protocol Derived : Base { // expected-error {{'Base' is ambiguous for type lookup in this context}}
|
|
associatedtype E
|
|
}
|
|
|
|
func foo<T : Derived>(_: T.E, _: T) {}
|