f1a2e41a8a
This was we don't get noisy baselines just because a different phase of the compiler reported the diagnostic. This helps with Yui's refactoring work to move grammar checks into the type checker.
55 lines
3.9 KiB
Plaintext
55 lines
3.9 KiB
Plaintext
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(12,20): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'.
|
|
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(14,9): error TS2346: Supplied parameters do not match any signature of call target.
|
|
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(16,13): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(17,13): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(18,13): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(19,13): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(19,20): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'.
|
|
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(20,13): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(21,9): error TS2346: Supplied parameters do not match any signature of call target.
|
|
tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(21,13): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
|
|
|
|
==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts (10 errors) ====
|
|
function foo(strs: string[]): number;
|
|
function foo(strs: string[], x: number): string;
|
|
function foo(strs: string[], x: number, y: number): boolean;
|
|
function foo(strs: string[], x: number, y: string): {};
|
|
function foo(...stuff: any[]): any {
|
|
return undefined;
|
|
}
|
|
|
|
var a = foo([]); // number
|
|
var b = foo([], 1); // string
|
|
var c = foo([], 1, 2); // boolean
|
|
var d = foo([], 1, true); // boolean (with error)
|
|
~~~~
|
|
!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'.
|
|
var e = foo([], 1, "2"); // {}
|
|
var f = foo([], 1, 2, 3); // any (with error)
|
|
~~~~~~~~~~~~~~~~
|
|
!!! error TS2346: Supplied parameters do not match any signature of call target.
|
|
|
|
var u = foo ``; // number
|
|
~~
|
|
!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
var v = foo `${1}`; // string
|
|
~~~
|
|
!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
var w = foo `${1}${2}`; // boolean
|
|
~~~
|
|
!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
var x = foo `${1}${true}`; // boolean (with error)
|
|
~~~
|
|
!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
~~~~
|
|
!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'.
|
|
var y = foo `${1}${"2"}`; // {}
|
|
~~~
|
|
!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
var z = foo `${1}${2}${3}`; // any (with error)
|
|
~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2346: Supplied parameters do not match any signature of call target.
|
|
~~~
|
|
!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
|
|
|