blob: e5cf3b6bd7f7192684cfd05a05f748cfaa03c06b [file] [log] [blame]
// RUN: %target-typecheck-verify-swift
struct Foo<T, U> { // expected-note {{'U' declared as parameter to type 'Foo'}}
var value: U
func bar() -> Foo<T, U> {
return Foo(value)
// expected-error@-1 {{generic parameter 'U' could not be inferred}}
// expected-note@-2 {{explicitly specify the generic arguments to fix this issue}}
}
}
extension Foo where T == U {
init(_ value: U) {
self.value = value
}
}