> On Mar 27, 2016, at 6:33 AM, Maximilian Hünenberger via swift-evolution 
> <[email protected]> wrote:
> 
> In the proposal there is no mention of generic functions.
> Take a map function of a Wrapper:
> 
> Wrapper<T> {
>        func map<U>(transform: T -> U) -> U { ... }
> }
> 
> let intWrapper = Wrapper(1)
> intWrapper.map{ print($0) } // this returns Void
> Should the last line be inferred to have a discardable result?

Yes, this will be inferred to return Void, so no warning will be produced.

-Chris
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to