2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts (1 errors) ====
|
|
|
|
var f10: <T>(x: T, b: () => (a: T) => void, y: T) => T;
|
|
|
|
f10('', () => a => a.foo, ''); // a is string, fixed by first parameter
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2339: Property 'foo' does not exist on type 'string'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var r9 = f10('', () => (a => a.foo), 1); // now a should be any
|