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

7 lines
319 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/functionOverloads2.ts (1 errors) ====
function foo(bar: string): string;
function foo(bar: number): number;
function foo(bar: any): any { return bar };
var x = foo(true);
~~~~
2014-07-25 04:39:50 +02:00
!!! Argument of type 'boolean' is not assignable to parameter of type 'number'.