Fixed bug in assignment checks between homogeneous multi-length tuples and fixed-size tuples.

This commit is contained in:
Eric Traut 2020-08-18 18:40:58 -07:00
parent 4a1bd7ffdd
commit 3abd066e48

View File

@ -12988,7 +12988,7 @@ export function createTypeEvaluator(importLookup: ImportLookup, printTypeFlags:
srcArgCount = 1;
}
if (srcTypeArgs.length === destArgCount || isDestHomogenousTuple || isSrcHomogeneousType) {
if ((srcTypeArgs.length === destArgCount && !isSrcHomogeneousType) || isDestHomogenousTuple) {
for (let i = 0; i < Math.max(destArgCount, srcArgCount); i++) {
const expectedDestType =
(isDestHomogenousTuple ? destTypeArgs[0] : destTypeArgs[i]) || AnyType.create();