Create a third interface I3 extends I1 and I2. Then class A and B both implement I3, and the generic method accepts I3.
That’s perhaps the only way to do it.
Create a third interface I3 extends I1 and I2. Then class A and B both implement I3, and the generic method accepts I3.
That’s perhaps the only way to do it.