take into account explicit type args when inferring anon parameter type