mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
14 lines
353 B
Swift
14 lines
353 B
Swift
// RUN: %target-parse-verify-swift
|
|
|
|
struct MyCollection<Element> {
|
|
func map<T>(transform: (Element) -> T) -> MyCollection<T> {
|
|
fatalError("implement")
|
|
}
|
|
}
|
|
|
|
MyCollection.map // expected-error{{generic parameter 'Element' could not be inferred}}
|
|
|
|
let a = MyCollection<Int>()
|
|
a.map // expected-error{{generic parameter 'T' could not be inferred}}
|
|
|