==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts (12 errors) ==== // Specialized signatures must be a subtype of a non-specialized signature // All the below should be errors function foo(x: 'a'); ~~~~~~~~~~~~~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. function foo(x: number) { } class C { foo(x: 'a'); ~~~~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. foo(x: number); foo(x: any) { } } class C2 { foo(x: 'a'); ~~~~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. foo(x: T); foo(x: any) { } } class C3 { foo(x: 'a'); ~~~~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. foo(x: T); foo(x: any) { } } interface I { (x: 'a'); ~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. (x: number); foo(x: 'a'); ~~~~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. foo(x: number); } interface I2 { (x: 'a'); ~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. (x: T); foo(x: 'a'); ~~~~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. foo(x: T); } interface I3 { (x: 'a'); ~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. (x: T); foo(x: 'a'); ~~~~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. foo(x: T); } var a: { (x: 'a'); ~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. (x: number); foo(x: 'a'); ~~~~~~~~~~~~ !!! Specialized overload signature is not assignable to any non-specialized signature. foo(x: number); } var a2: { (x: 'a'); (x: T); foo(x: 'a'); foo(x: T); } var a3: { (x: 'a'); (x: T); foo(x: 'a'); foo(x: T); }