mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-17 11:17:17 +03:00
Fixed bug in assignment checks between homogeneous multi-length tuples and fixed-size tuples.
This commit is contained in:
parent
4a1bd7ffdd
commit
3abd066e48
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user