TypeScript/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt

15 lines
1 KiB
Plaintext
Raw Normal View History

tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(2,22): error TS2339: Property 'foo' does not exist on type 'string'.
2015-01-30 06:22:56 +01:00
tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,32): error TS2339: Property 'foo' does not exist on type 'string'.
tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,38): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
==== tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts (3 errors) ====
2014-07-13 01:04:16 +02:00
var f10: <T>(x: T, b: () => (a: T) => void, y: T) => T;
2014-10-10 23:41:14 +02:00
f10('', () => a => a.foo, ''); // a is string
2014-07-13 01:04:16 +02:00
~~~
!!! error TS2339: Property 'foo' does not exist on type 'string'.
var r9 = f10('', () => (a => a.foo), 1); // error
~~~
2015-01-30 06:22:56 +01:00
!!! error TS2339: Property 'foo' does not exist on type 'string'.
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.