Commits
Arnold Schwaighofer committed 1ee52e26c24
Sema: ObjC type parameters can capture generic types
For example in:
public final class MyCache<V> {
private let cache: NSCache<NSObject, CacheValue<V>>
public init(cacheName: String) {
self.cache = {
let cache = NSCache<NSObject, CacheValue<V>>()
return cache
}()
}
}
The metatype that we pass to the NSCache initializer captures the generic type
'V'. Therefore, the closure needs to be a generic function type.
SR-1951
rdar://27410181