class A {} class B { A foo(){ return null; } void bar(B b){ baz(b.foo()); } void baz(A a) {} }