class X { } interface Foo { A foo(A a, B b); } class SamTest { static void test(Foo foo) { } }