Cannot implement an interface in class A if it contains a function parameter of class A

And the interface