TypeScript/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt

17 lines
1.1 KiB
Text
Raw Normal View History

tests/cases/compiler/overloadingOnConstantsInImplementation.ts(1,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
tests/cases/compiler/overloadingOnConstantsInImplementation.ts(2,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
tests/cases/compiler/overloadingOnConstantsInImplementation.ts(3,1): error TS2381: A signature with an implementation cannot use a string literal type.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/overloadingOnConstantsInImplementation.ts (3 errors) ====
function foo(a: 'hi', x: string);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! 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);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! 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: any) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~
!!! error TS2381: A signature with an implementation cannot use a string literal type.