> On Apr 6, 2016, at 11:48 AM, Sean Heber via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> This almost seems like it could work so that it didn't even need the 
> bracketed parts to be able to figure out the types:
> 
> func anyCommonElements(lhs: T, _ rhs: U) -> Bool where
>    T : SequenceType,
>    U : SequenceType,
>    T.Generator.Element: Equatable,
>    T.Generator.Element == U.Generator.Element
> {}
> 

... though if there are no type constraints, this would be ambiguous:

        // If there are no know types T and R in scope, is this an error or are 
T and R assumed to be unconstrained generic parameters?
        func f(arg: T) -> R

-tim

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to