mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
21 lines
699 B
TypeScript
21 lines
699 B
TypeScript
//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures3.ts] ////
|
|
|
|
//// [assignmentCompatWithGenericCallSignatures3.ts]
|
|
// some complex cases of assignment compat of generic signatures that stress contextual signature instantiation
|
|
|
|
interface I<T, S> {
|
|
<U>(f: (x: T) => (y: S) => U): U
|
|
}
|
|
|
|
var g: <T>(x: T) => <S>(y: S) => I<T, S>
|
|
var h: <T>(x: T) => <S>(y: S) => { <U>(f: (x: T) => (y: S) => U): U }
|
|
|
|
g = h // ok
|
|
|
|
//// [assignmentCompatWithGenericCallSignatures3.js]
|
|
"use strict";
|
|
// some complex cases of assignment compat of generic signatures that stress contextual signature instantiation
|
|
var g;
|
|
var h;
|
|
g = h; // ok
|