TypeScript/tests/baselines/reference/genericWithCallSignatureReturningSpecialization.types

23 lines
348 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/genericWithCallSignatureReturningSpecialization.ts ===
interface B<T> {
>B : B<T>
>T : T
2014-08-15 23:33:16 +02:00
f(): B<number>;
>f : () => B<number>
>B : B<T>
2014-08-15 23:33:16 +02:00
(value: T): void;
>value : T
>T : T
2014-08-15 23:33:16 +02:00
}
var x: B<boolean>;
>x : B<boolean>
>B : B<T>
2014-08-15 23:33:16 +02:00
x(true); // was error
>x(true) : void
>x : B<boolean>
2015-04-13 21:36:11 +02:00
>true : boolean
2014-08-15 23:33:16 +02:00