Does Duck Typing also work for Generic Types and Protocols


(robkuz) #1
func Test(_ o: IFooBar<F, B>)

Test(duck<IFooBar<_,_>>(fb))

(Carlo Kok) #2

if you pass F, B in the body too, and fb implements all members of this interface then yes.