mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
14 lines
693 B
Plaintext
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. |