TypeScript/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.errors.txt
Daniel Rosenwasser 56027663bf Initial work on overload resolution with tagged templates.
Currently type argument inference breaks hard when the first parameter of a tag has a generic type.
2014-11-04 15:05:05 -08:00

53 lines
2.6 KiB
Plaintext

tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts(14,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts(18,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts(22,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts(24,25): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts(26,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts(28,57): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts (6 errors) ====
interface I {
(stringParts: string[], ...rest: boolean[]): I;
g: I;
h: I;
member: I;
thisIsNotATag(x: string): void
[x: number]: I;
}
var f: I;
f `abc`
f `abc${1}def${2}ghi`;
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
f `abc`.member
f `abc${1}def${2}ghi`.member;
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
f `abc`["member"];
f `abc${1}def${2}ghi`["member"];
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
f `abc`[0].member `abc${1}def${2}ghi`;
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`;
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi`;
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
f.thisIsNotATag(`abc`);
f.thisIsNotATag(`abc${1}def${2}ghi`);