mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
13 lines
526 B
Plaintext
13 lines
526 B
Plaintext
assignmentCompatWithGenericCallSignatures.ts(6,5): error TS2454: Variable 'g' is used before being assigned.
|
|
|
|
|
|
==== assignmentCompatWithGenericCallSignatures.ts (1 errors) ====
|
|
// some complex cases of assignment compat of generic signatures that stress contextual signature instantiation
|
|
|
|
var f: <S extends { p: string }[]>(x: S) => void
|
|
var g: <T extends { p: string }>(x: T[]) => void
|
|
|
|
f = g; // ok
|
|
~
|
|
!!! error TS2454: Variable 'g' is used before being assigned.
|
|
g = f; // ok |