2014-09-12 22:35:07 +02:00
tests/cases/compiler/specializedSignatureOverloadReturnTypeWithIndexers.ts(15,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/specializedSignatureOverloadReturnTypeWithIndexers.ts (1 errors) ====
interface A {
f(p: string): { [p: string]: string; };
f(p: "spec"): { [p: string]: any; } // Should be ok
}
interface B {
f(p: string): { [p: number]: string; };
f(p: "spec"): { [p: string]: any; } // Should be ok
}
interface C {
f(p: string): { [p: number]: string; };
f(p: "spec"): { [p: number]: any; } // Should be ok
}
interface D {
f(p: string): { [p: string]: string; };
f(p: "spec"): { [p: number]: any; } // Should be error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
2014-07-13 01:04:16 +02:00
}