[swift-evolution] Proposal: Allow explicit type parameter specification in generic function call
Ramiro Feria Purón
ramiro.feria.puron at gmail.com
Mon Nov 21 22:18:14 CST 2016
Thanks Dave!
As another example, consider it as part of this common pattern:
class A<T> {
init() {
// ..
}
}
class B<T>: A<T> {
override init() {
// ..
}
}
class Factory {
class func makeA<T>() -> A<T> { return B<T>() }
//..
}
Factory.makeA<Int>()
Kind regards,
Ramiro
2016-11-22 14:14 GMT+11:00 Dave Abrahams via swift-evolution <
swift-evolution at swift.org>:
>
> on Mon Nov 21 2016, Ramiro Feria Purón <swift-evolution at swift.org> wrote:
>
> > *Proposed Solution:*
> >
> > Allow explicit type parameters in generic function call:
> >
> > let _ = g<String>(7) // Ok
>
> I think we want this capability, but it isn't a high priority and it's
> an additive feature so it's certainly out-of-scope for Swift 4 phase 1.
>
> --
> -Dave
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161122/90dfa822/attachment.html>
More information about the swift-evolution
mailing list