Does Duck Typing also work for Generic Types and Protocols

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

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

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