TypeScript/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt
Anders Hejlsberg a515b199b7 Better error messages in function calls.
Fixes #93.
This is an evolution of #220.
2014-07-24 17:00:03 -07:00

19 lines
No EOL
529 B
Text

==== tests/cases/compiler/inheritedConstructorWithRestParams.ts (2 errors) ====
class Base {
constructor(...a: string[]) { }
}
class Derived extends Base { }
// Ok
new Derived("", "");
new Derived("");
new Derived();
// Errors
new Derived("", 3);
~
!!! Argument type 'number' is not assignable to parameter type 'string'.
new Derived(3);
~
!!! Argument type 'number' is not assignable to parameter type 'string'.