fix compile error on swift caused by two different protocols having the same method name and different type parameters