2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts (2 errors) ====
|
|
|
|
function foo(a: 'hi', x: string);
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
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
|
|
|
function foo(a: 'hi', x: string);
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
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
|
|
|
function foo(a: any, x: any) {
|
|
|
|
}
|
|
|
|
|
|
|
|
function foo2(a: 'hi', x: string);
|
|
|
|
function foo2(a: 'hi', x: string);
|
|
|
|
function foo2(a: string, x: string);
|
|
|
|
function foo2(a: any, x: any) {
|
|
|
|
}
|