Files
tsgo/testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation2.errors.txt

14 lines
693 B
Plaintext

contextualSignatureInstantiation2.ts(5,15): error TS2454: Variable 'id' is used before being assigned.
contextualSignatureInstantiation2.ts(5,19): error TS2454: Variable 'id' is used before being assigned.
==== contextualSignatureInstantiation2.ts (2 errors) ====
// dot f g x = f(g(x))
var dot: <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S;
dot = <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x));
var id: <T>(x:T) => T;
var r23 = dot(id)(id);
~~
!!! error TS2454: Variable 'id' is used before being assigned.
~~
!!! error TS2454: Variable 'id' is used before being assigned.