=== tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts === module Underscore { >Underscore : unknown export interface Iterator { >Iterator : Iterator >T : T >U : U (value: T, index: any, list: any): U; >value : T >T : T >index : any >list : any >U : U } export interface Static { >Static : Static all(list: T[], iterator?: Iterator, context?: any): boolean; >all : (list: T[], iterator?: Iterator, context?: any) => boolean >T : T >list : T[] >T : T >iterator : Iterator >Iterator : Iterator >T : T >context : any identity(value: T): T; >identity : (value: T) => T >T : T >value : T >T : T >T : T } } declare var _: Underscore.Static; >_ : Underscore.Static >Underscore : unknown >Static : Underscore.Static // No error, Call signatures of types '(value: T) => T' and 'Underscore.Iterator<{}, boolean>' are compatible when instantiated with any. // Ideally, we would not have a generic signature here, because it should be instantiated with {} during inferential typing _.all([true, 1, null, 'yes'], _.identity); >_.all([true, 1, null, 'yes'], _.identity) : boolean >_.all : (list: T[], iterator?: Underscore.Iterator, context?: any) => boolean >_ : Underscore.Static >all : (list: T[], iterator?: Underscore.Iterator, context?: any) => boolean >[true, 1, null, 'yes'] : (string | number | boolean)[] >_.identity : (value: T) => T >_ : Underscore.Static >identity : (value: T) => T // Ok, because fixing makes us infer boolean for T _.all([true], _.identity); >_.all([true], _.identity) : boolean >_.all : (list: T[], iterator?: Underscore.Iterator, context?: any) => boolean >_ : Underscore.Static >all : (list: T[], iterator?: Underscore.Iterator, context?: any) => boolean >[true] : boolean[] >_.identity : (value: T) => T >_ : Underscore.Static >identity : (value: T) => T