function f() { function g(u: U): U { return null } return g; } var h: (v: V, func: (v: V) => W) => W; var x = h("", f()); // Call should succeed and x should be string. All type parameters should be instantiated to string