Merge pull request #7328 from Microsoft/flipSidesInSignatureCheck

flip sides source and target when we check signature relations
This commit is contained in:
Vladimir Matveev committed 2016-03-01 19:28:19 -08:00
commit f34dcdd464
49 files changed
+287 -301

No files matched your search

+1 -1
View File
@@ -5337,7 +5337,7 @@ namespace ts {
for (let i = 0; i < checkCount; i++) {
const s = i < sourceMax ? getTypeOfSymbol(sourceParams[i]) : getRestTypeOfSignature(source);
const t = i < targetMax ? getTypeOfSymbol(targetParams[i]) : getRestTypeOfSignature(target);
const related = compareTypes(t, s, /*reportErrors*/ false) || compareTypes(s, t, reportErrors);
const related = compareTypes(s, t, /*reportErrors*/ false) || compareTypes(t, s, reportErrors);
if (!related) {
if (reportErrors) {
errorReporter(Diagnostics.Types_of_parameters_0_and_1_are_incompatible,