@zzzen/pyright-internal 1.2.0-dev.20240505 → 1.2.0-dev.20240519
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyzer/analyzerFileInfo.js +3 -2
- package/dist/analyzer/analyzerFileInfo.js.map +1 -1
- package/dist/analyzer/binder.js +6 -0
- package/dist/analyzer/binder.js.map +1 -1
- package/dist/analyzer/checker.js +21 -7
- package/dist/analyzer/checker.js.map +1 -1
- package/dist/analyzer/codeFlowEngine.js +23 -2
- package/dist/analyzer/codeFlowEngine.js.map +1 -1
- package/dist/analyzer/constraintSolver.js +7 -16
- package/dist/analyzer/constraintSolver.js.map +1 -1
- package/dist/analyzer/dataClasses.js +29 -24
- package/dist/analyzer/dataClasses.js.map +1 -1
- package/dist/analyzer/declaration.d.ts +1 -0
- package/dist/analyzer/declaration.js.map +1 -1
- package/dist/analyzer/deprecatedSymbols.js +1 -0
- package/dist/analyzer/deprecatedSymbols.js.map +1 -1
- package/dist/analyzer/enums.d.ts +2 -5
- package/dist/analyzer/enums.js +97 -40
- package/dist/analyzer/enums.js.map +1 -1
- package/dist/analyzer/operations.js +11 -1
- package/dist/analyzer/operations.js.map +1 -1
- package/dist/analyzer/patternMatching.js +1 -1
- package/dist/analyzer/patternMatching.js.map +1 -1
- package/dist/analyzer/properties.js +3 -3
- package/dist/analyzer/properties.js.map +1 -1
- package/dist/analyzer/scope.d.ts +4 -0
- package/dist/analyzer/scope.js +6 -1
- package/dist/analyzer/scope.js.map +1 -1
- package/dist/analyzer/sourceFile.js +13 -5
- package/dist/analyzer/sourceFile.js.map +1 -1
- package/dist/analyzer/typeEvaluator.js +119 -159
- package/dist/analyzer/typeEvaluator.js.map +1 -1
- package/dist/analyzer/typeGuards.js +56 -26
- package/dist/analyzer/typeGuards.js.map +1 -1
- package/dist/analyzer/typeUtils.d.ts +1 -1
- package/dist/analyzer/typeUtils.js +11 -78
- package/dist/analyzer/typeUtils.js.map +1 -1
- package/dist/analyzer/types.d.ts +0 -1
- package/dist/analyzer/types.js +5 -0
- package/dist/analyzer/types.js.map +1 -1
- package/dist/common/pythonVersion.d.ts +1 -0
- package/dist/common/pythonVersion.js +2 -1
- package/dist/common/pythonVersion.js.map +1 -1
- package/dist/localization/localize.d.ts +6 -6
- package/dist/localization/localize.js +2 -2
- package/dist/localization/localize.js.map +1 -1
- package/dist/localization/package.nls.cs.json +0 -2
- package/dist/localization/package.nls.de.json +0 -2
- package/dist/localization/package.nls.en-us.json +3 -3
- package/dist/localization/package.nls.es.json +0 -2
- package/dist/localization/package.nls.fr.json +0 -2
- package/dist/localization/package.nls.it.json +0 -2
- package/dist/localization/package.nls.ja.json +0 -2
- package/dist/localization/package.nls.ko.json +1 -3
- package/dist/localization/package.nls.pl.json +0 -2
- package/dist/localization/package.nls.pt-br.json +0 -2
- package/dist/localization/package.nls.qps-ploc.json +0 -2
- package/dist/localization/package.nls.ru.json +0 -2
- package/dist/localization/package.nls.tr.json +0 -2
- package/dist/localization/package.nls.zh-cn.json +0 -2
- package/dist/localization/package.nls.zh-tw.json +0 -2
- package/dist/parser/parser.js +4 -3
- package/dist/parser/parser.js.map +1 -1
- package/dist/parser/tokenizerTypes.d.ts +1 -0
- package/dist/parser/tokenizerTypes.js +4 -0
- package/dist/parser/tokenizerTypes.js.map +1 -1
- package/dist/tests/completions.test.js +2 -2
- package/dist/tests/completions.test.js.map +1 -1
- package/dist/tests/typeEvaluator1.test.js +4 -0
- package/dist/tests/typeEvaluator1.test.js.map +1 -1
- package/dist/tests/typeEvaluator2.test.js +8 -0
- package/dist/tests/typeEvaluator2.test.js.map +1 -1
- package/dist/tests/typeEvaluator3.test.js +4 -0
- package/dist/tests/typeEvaluator3.test.js.map +1 -1
- package/dist/tests/typeEvaluator4.test.js +6 -2
- package/dist/tests/typeEvaluator4.test.js.map +1 -1
- package/dist/tests/typeEvaluator6.test.js +1 -1
- package/dist/tests/typeEvaluator7.test.js +1 -5
- package/dist/tests/typeEvaluator7.test.js.map +1 -1
- package/dist/tests/typeEvaluator8.test.js +4 -0
- package/dist/tests/typeEvaluator8.test.js.map +1 -1
- package/package.json +1 -1
@@ -3118,6 +3118,11 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
3118
3118
|
// Handles the case where a variable or parameter is defined in an outer
|
3119
3119
|
// scope and captured by an inner scope (a function, lambda, or comprehension).
|
3120
3120
|
function getCodeFlowTypeForCapturedVariable(node, symbolWithScope, effectiveType) {
|
3121
|
+
// This function applies only to captured variables, not those that
|
3122
|
+
// are accessed via an explicit nonlocal or global binding.
|
3123
|
+
if (symbolWithScope.usesGlobalBinding || symbolWithScope.usesNonlocalBinding) {
|
3124
|
+
return undefined;
|
3125
|
+
}
|
3121
3126
|
// This function applies only to variables, parameters, and imports, not to other
|
3122
3127
|
// types of symbols.
|
3123
3128
|
const decls = symbolWithScope.symbol.getDeclarations();
|
@@ -3225,14 +3230,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
3225
3230
|
if (memberName === 'args' || memberName === 'kwargs') {
|
3226
3231
|
const outerFunctionScope = ParseTreeUtils.getEnclosingClassOrFunction(enclosingScope);
|
3227
3232
|
if ((outerFunctionScope === null || outerFunctionScope === void 0 ? void 0 : outerFunctionScope.nodeType) === 28 /* ParseNodeType.Function */) {
|
3228
|
-
|
3229
|
-
addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.paramSpecScopedToReturnType().format({
|
3230
|
-
name: type.details.name,
|
3231
|
-
}), node);
|
3232
|
-
}
|
3233
|
-
else {
|
3234
|
-
enclosingScope = outerFunctionScope;
|
3235
|
-
}
|
3233
|
+
enclosingScope = outerFunctionScope;
|
3236
3234
|
}
|
3237
3235
|
else if (!scopedTypeVarInfo.type.scopeId) {
|
3238
3236
|
addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.paramSpecNotUsedByOuterScope().format({
|
@@ -3267,17 +3265,9 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
3267
3265
|
else if ((flags & 4096 /* EvaluatorFlags.AllowTypeVarsWithoutScopeId */) === 0) {
|
3268
3266
|
if ((type.scopeId === undefined || scopedTypeVarInfo.foundInterveningClass) &&
|
3269
3267
|
!type.details.isSynthesized) {
|
3270
|
-
|
3271
|
-
|
3272
|
-
|
3273
|
-
? localize_1.LocMessage.paramSpecScopedToReturnType()
|
3274
|
-
: localize_1.LocMessage.typeVarScopedToReturnType();
|
3275
|
-
}
|
3276
|
-
else {
|
3277
|
-
message = (0, types_1.isParamSpec)(type)
|
3278
|
-
? localize_1.LocMessage.paramSpecNotUsedByOuterScope()
|
3279
|
-
: localize_1.LocMessage.typeVarNotUsedByOuterScope();
|
3280
|
-
}
|
3268
|
+
const message = (0, types_1.isParamSpec)(type)
|
3269
|
+
? localize_1.LocMessage.paramSpecNotUsedByOuterScope()
|
3270
|
+
: localize_1.LocMessage.typeVarNotUsedByOuterScope();
|
3281
3271
|
addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, message.format({ name: type.details.name }), node);
|
3282
3272
|
}
|
3283
3273
|
}
|
@@ -3352,7 +3342,6 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
3352
3342
|
// Walks up the parse tree to find a function, class, or type alias
|
3353
3343
|
// declaration that provides the context for a type variable.
|
3354
3344
|
function findScopedTypeVar(node, type) {
|
3355
|
-
var _a;
|
3356
3345
|
let curNode = node;
|
3357
3346
|
let nestedClassCount = 0;
|
3358
3347
|
(0, debug_1.assert)(types_1.TypeBase.isInstantiable(type));
|
@@ -3376,12 +3365,6 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
3376
3365
|
if (functionType) {
|
3377
3366
|
const functionDetails = functionType.details;
|
3378
3367
|
typeParametersForScope = functionDetails.typeParameters;
|
3379
|
-
// Was this type parameter "rescoped" to a callable found within the
|
3380
|
-
// return type annotation? If so, it is not available for use within
|
3381
|
-
// the function body.
|
3382
|
-
if ((_a = functionDetails.rescopedTypeParameters) === null || _a === void 0 ? void 0 : _a.some((tp) => tp.details.name === type.details.name)) {
|
3383
|
-
return { type, isRescoped: true, foundInterveningClass: false };
|
3384
|
-
}
|
3385
3368
|
}
|
3386
3369
|
scopeUsesTypeParameterSyntax = !!curNode.typeParameters;
|
3387
3370
|
}
|
@@ -3395,7 +3378,6 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
3395
3378
|
type = types_1.TypeVarType.cloneForScopeId(type, match.scopeId, match.scopeName, match.scopeType);
|
3396
3379
|
return {
|
3397
3380
|
type,
|
3398
|
-
isRescoped: false,
|
3399
3381
|
foundInterveningClass: nestedClassCount > 1 && !scopeUsesTypeParameterSyntax,
|
3400
3382
|
};
|
3401
3383
|
}
|
@@ -3436,13 +3418,12 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
3436
3418
|
if (allowedTypeParams) {
|
3437
3419
|
if (!allowedTypeParams.some((param) => param.details.name === type.details.name)) {
|
3438
3420
|
// Return the original type.
|
3439
|
-
return { type,
|
3421
|
+
return { type, foundInterveningClass: false };
|
3440
3422
|
}
|
3441
3423
|
}
|
3442
3424
|
}
|
3443
3425
|
return {
|
3444
3426
|
type: types_1.TypeVarType.cloneForScopeId(type, leftType.details.recursiveTypeAliasScopeId, leftType.details.recursiveTypeAliasName, 2 /* TypeVarScopeType.TypeAlias */),
|
3445
|
-
isRescoped: false,
|
3446
3427
|
foundInterveningClass: false,
|
3447
3428
|
};
|
3448
3429
|
}
|
@@ -3450,7 +3431,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
3450
3431
|
curNode = curNode.parent;
|
3451
3432
|
}
|
3452
3433
|
// Return the original type.
|
3453
|
-
return { type,
|
3434
|
+
return { type, foundInterveningClass: false };
|
3454
3435
|
}
|
3455
3436
|
function getTypeOfMemberAccess(node, flags) {
|
3456
3437
|
var _a;
|
@@ -3542,7 +3523,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
3542
3523
|
return typeResult;
|
3543
3524
|
}
|
3544
3525
|
function getTypeOfMemberAccessWithBaseType(node, baseTypeResult, usage, flags) {
|
3545
|
-
var _a;
|
3526
|
+
var _a, _b;
|
3546
3527
|
let baseType = (0, typeUtils_1.transformPossibleRecursiveTypeAlias)(baseTypeResult.type);
|
3547
3528
|
const memberName = node.memberName.value;
|
3548
3529
|
let diag = new diagnostic_1.DiagnosticAddendum();
|
@@ -3627,8 +3608,20 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
3627
3608
|
}
|
3628
3609
|
case 6 /* TypeCategory.Class */: {
|
3629
3610
|
let typeResult;
|
3630
|
-
|
3631
|
-
|
3611
|
+
const enumMemberResult = (0, enums_1.getTypeOfEnumMember)(evaluatorInterface, node, baseType, memberName, isIncomplete);
|
3612
|
+
if (enumMemberResult) {
|
3613
|
+
if (usage.method === 'get') {
|
3614
|
+
typeResult = enumMemberResult;
|
3615
|
+
}
|
3616
|
+
else {
|
3617
|
+
// Is this an attempt to delete or overwrite an enum member?
|
3618
|
+
if ((0, types_1.isClassInstance)(enumMemberResult.type) &&
|
3619
|
+
types_1.ClassType.isSameGenericClass(enumMemberResult.type, baseType) &&
|
3620
|
+
enumMemberResult.type.literalValue !== undefined) {
|
3621
|
+
const diagMessage = usage.method === 'set' ? localize_1.LocMessage.enumMemberSet() : localize_1.LocMessage.enumMemberDelete();
|
3622
|
+
addDiagnostic(diagnosticRules_1.DiagnosticRule.reportAttributeAccessIssue, diagMessage.format({ name: memberName }) + diag.getString(), node.memberName, (_a = diag.getEffectiveTextRange()) !== null && _a !== void 0 ? _a : node.memberName);
|
3623
|
+
}
|
3624
|
+
}
|
3632
3625
|
}
|
3633
3626
|
if (!typeResult) {
|
3634
3627
|
typeResult = getTypeOfBoundMember(node.memberName, baseType, memberName, usage, diag,
|
@@ -3814,7 +3807,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
3814
3807
|
const rule = isFunctionRule
|
3815
3808
|
? diagnosticRules_1.DiagnosticRule.reportFunctionMemberAccess
|
3816
3809
|
: diagnosticRules_1.DiagnosticRule.reportAttributeAccessIssue;
|
3817
|
-
addDiagnostic(rule, diagMessage.format({ name: memberName, type: printType(baseType) }) + diag.getString(), node.memberName, (
|
3810
|
+
addDiagnostic(rule, diagMessage.format({ name: memberName, type: printType(baseType) }) + diag.getString(), node.memberName, (_b = diag.getEffectiveTextRange()) !== null && _b !== void 0 ? _b : node.memberName);
|
3818
3811
|
}
|
3819
3812
|
// If this is member access on a function, use "Any" so if the
|
3820
3813
|
// reportFunctionMemberAccess rule is disabled, we don't trigger
|
@@ -5274,19 +5267,19 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
5274
5267
|
const unboundedIndex = tupleTypeArgs.findIndex((typeArg) => typeArg.isUnbounded || (0, types_1.isVariadicTypeVar)(typeArg.type));
|
5275
5268
|
if (value < 0) {
|
5276
5269
|
value = tupleTypeArgs.length + value;
|
5277
|
-
if (value
|
5270
|
+
if (unboundedIndex >= 0 && value <= unboundedIndex) {
|
5278
5271
|
return undefined;
|
5279
5272
|
}
|
5280
|
-
else if (
|
5281
|
-
return
|
5273
|
+
else if (value < 0) {
|
5274
|
+
return 0;
|
5282
5275
|
}
|
5283
5276
|
}
|
5284
5277
|
else {
|
5285
|
-
if (value >
|
5278
|
+
if (unboundedIndex >= 0 && value > unboundedIndex) {
|
5286
5279
|
return undefined;
|
5287
5280
|
}
|
5288
|
-
else if (
|
5289
|
-
return
|
5281
|
+
else if (value > tupleTypeArgs.length) {
|
5282
|
+
return tupleTypeArgs.length;
|
5290
5283
|
}
|
5291
5284
|
}
|
5292
5285
|
}
|
@@ -5889,7 +5882,9 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
5889
5882
|
if (node.arguments.length > 0) {
|
5890
5883
|
targetClassType = getTypeOfExpression(node.arguments[0].valueExpression).type;
|
5891
5884
|
const concreteTargetClassType = makeTopLevelTypeVarsConcrete(targetClassType);
|
5892
|
-
if (!(0, types_1.isAnyOrUnknown)(concreteTargetClassType) &&
|
5885
|
+
if (!(0, types_1.isAnyOrUnknown)(concreteTargetClassType) &&
|
5886
|
+
!(0, types_1.isInstantiableClass)(concreteTargetClassType) &&
|
5887
|
+
!(0, typeUtils_1.isMetaclassInstance)(concreteTargetClassType)) {
|
5893
5888
|
addDiagnostic(diagnosticRules_1.DiagnosticRule.reportArgumentType, localize_1.LocMessage.superCallFirstArg().format({ type: printType(targetClassType) }), node.arguments[0].valueExpression);
|
5894
5889
|
}
|
5895
5890
|
}
|
@@ -6809,19 +6804,22 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
6809
6804
|
if (expandedCallType.details.name === 'type' && argList.length === 1) {
|
6810
6805
|
const argType = getTypeOfArgument(argList[0]).type;
|
6811
6806
|
const returnType = (0, typeUtils_1.mapSubtypes)(argType, (subtype) => {
|
6812
|
-
|
6813
|
-
|
6814
|
-
return (_a = subtype.details.effectiveMetaclass) !== null && _a !== void 0 ? _a : types_1.AnyType.create();
|
6807
|
+
if ((0, types_1.isInstantiableClass)(subtype) && subtype.details.effectiveMetaclass) {
|
6808
|
+
return subtype.details.effectiveMetaclass;
|
6815
6809
|
}
|
6816
|
-
if ((0, types_1.
|
6817
|
-
|
6818
|
-
(0, typeUtils_1.isNoneInstance)(subtype)) {
|
6819
|
-
return (0, typeUtils_1.convertToInstantiable)(stripLiteralValue(subtype));
|
6810
|
+
if ((0, types_1.isNever)(subtype)) {
|
6811
|
+
return subtype;
|
6820
6812
|
}
|
6821
|
-
if (
|
6822
|
-
|
6813
|
+
if (types_1.TypeBase.isInstance(subtype)) {
|
6814
|
+
if ((0, types_1.isClass)(subtype) || (0, types_1.isTypeVar)(subtype)) {
|
6815
|
+
return (0, typeUtils_1.convertToInstantiable)(stripLiteralValue(subtype));
|
6816
|
+
}
|
6817
|
+
if ((0, types_1.isFunction)(subtype)) {
|
6818
|
+
return types_1.FunctionType.cloneAsInstantiable(subtype);
|
6819
|
+
}
|
6823
6820
|
}
|
6824
|
-
return types_1.
|
6821
|
+
return types_1.ClassType.cloneForSpecialization(types_1.ClassType.cloneAsInstance(expandedCallType), [types_1.UnknownType.create()],
|
6822
|
+
/* isTypeArgumentExplicit */ true);
|
6825
6823
|
});
|
6826
6824
|
return { returnType };
|
6827
6825
|
}
|
@@ -8177,7 +8175,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
8177
8175
|
// call to a generic function or if this isn't a callable
|
8178
8176
|
// return with type parameters that are rescoped from the original
|
8179
8177
|
// function to the returned callable.
|
8180
|
-
const unknownIfNotFound = !ParseTreeUtils.getTypeVarScopesForNode(errorNode).some((typeVarScope) => typeVarContext.hasSolveForScope(typeVarScope))
|
8178
|
+
const unknownIfNotFound = !ParseTreeUtils.getTypeVarScopesForNode(errorNode).some((typeVarScope) => typeVarContext.hasSolveForScope(typeVarScope));
|
8181
8179
|
let specializedReturnType = (0, typeUtils_1.applySolvedTypeVars)(returnType, typeVarContext, {
|
8182
8180
|
unknownIfNotFound,
|
8183
8181
|
unknownExemptTypeVars: getUnknownExemptTypeVarsForReturnType(type, returnType),
|
@@ -8456,7 +8454,8 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
8456
8454
|
8 /* EvaluatorFlags.EvaluateStringLiteralAsType */ |
|
8457
8455
|
32 /* EvaluatorFlags.DisallowParamSpec */ |
|
8458
8456
|
64 /* EvaluatorFlags.DisallowTypeVarTuple */ |
|
8459
|
-
16 /* EvaluatorFlags.DisallowFinal */
|
8457
|
+
16 /* EvaluatorFlags.DisallowFinal */ |
|
8458
|
+
2 /* EvaluatorFlags.DoNotSpecialize */
|
8460
8459
|
: 2 /* EvaluatorFlags.DoNotSpecialize */ | 16 /* EvaluatorFlags.DisallowFinal */;
|
8461
8460
|
const exprTypeResult = getTypeOfExpression(argParam.argument.valueExpression, flags, (0, typeUtils_1.makeInferenceContext)(expectedType, !!(typeResult === null || typeResult === void 0 ? void 0 : typeResult.isIncomplete), signatureTracker));
|
8462
8461
|
argType = exprTypeResult.type;
|
@@ -8937,9 +8936,10 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
8937
8936
|
return paramSpec;
|
8938
8937
|
}
|
8939
8938
|
function getParamSpecDefaultType(node, isPep695Syntax) {
|
8940
|
-
const functionType = types_1.FunctionType.createSynthesizedInstance('',
|
8939
|
+
const functionType = types_1.FunctionType.createSynthesizedInstance('', 65536 /* FunctionTypeFlags.ParamSpecValue */);
|
8941
8940
|
if (node.nodeType === 18 /* ParseNodeType.Ellipsis */) {
|
8942
8941
|
types_1.FunctionType.addDefaultParameters(functionType);
|
8942
|
+
functionType.details.flags |= 32768 /* FunctionTypeFlags.SkipArgsKwargsCompatibilityCheck */;
|
8943
8943
|
return functionType;
|
8944
8944
|
}
|
8945
8945
|
if (node.nodeType === 31 /* ParseNodeType.List */) {
|
@@ -10591,7 +10591,11 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
10591
10591
|
}
|
10592
10592
|
literalTypes.push(type);
|
10593
10593
|
}
|
10594
|
-
|
10594
|
+
let result = (0, types_1.combineTypes)(literalTypes);
|
10595
|
+
if ((0, types_1.isUnion)(result) && unionClassType && (0, types_1.isInstantiableClass)(unionClassType)) {
|
10596
|
+
result = types_1.TypeBase.cloneAsSpecialForm(result, types_1.ClassType.cloneAsInstance(unionClassType));
|
10597
|
+
}
|
10598
|
+
return result;
|
10595
10599
|
}
|
10596
10600
|
// Creates a ClassVar type.
|
10597
10601
|
function createClassVarType(classType, errorNode, typeArgs, flags) {
|
@@ -11301,7 +11305,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
11301
11305
|
return undefined;
|
11302
11306
|
}
|
11303
11307
|
function evaluateTypesForAssignmentStatement(node) {
|
11304
|
-
var _a
|
11308
|
+
var _a;
|
11305
11309
|
const fileInfo = AnalyzerNodeInfo.getFileInfo(node);
|
11306
11310
|
// If the entire statement has already been evaluated, don't
|
11307
11311
|
// re-evaluate it.
|
@@ -11402,20 +11406,6 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
11402
11406
|
}
|
11403
11407
|
// If this is an enum, transform the type as required.
|
11404
11408
|
rightHandType = srcType;
|
11405
|
-
let targetName;
|
11406
|
-
if (node.leftExpression.nodeType === 38 /* ParseNodeType.Name */) {
|
11407
|
-
targetName = node.leftExpression;
|
11408
|
-
}
|
11409
|
-
else if (node.leftExpression.nodeType === 54 /* ParseNodeType.TypeAnnotation */ &&
|
11410
|
-
node.leftExpression.valueExpression.nodeType === 38 /* ParseNodeType.Name */) {
|
11411
|
-
targetName = node.leftExpression.valueExpression;
|
11412
|
-
}
|
11413
|
-
if (targetName) {
|
11414
|
-
rightHandType =
|
11415
|
-
(_a = (0, enums_1.transformTypeForPossibleEnumClass)(evaluatorInterface, node, targetName, () => {
|
11416
|
-
return { assignedType: rightHandType };
|
11417
|
-
})) !== null && _a !== void 0 ? _a : rightHandType;
|
11418
|
-
}
|
11419
11409
|
if (typeAliasNameNode) {
|
11420
11410
|
// If this was a speculative type alias, it becomes a real type alias
|
11421
11411
|
// only if the evaluated type is an instantiable type.
|
@@ -11436,7 +11426,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
11436
11426
|
typeAliasTypeVar.details.boundType = rightHandType;
|
11437
11427
|
// Record the type parameters within the recursive type alias so it
|
11438
11428
|
// can be specialized.
|
11439
|
-
typeAliasTypeVar.details.recursiveTypeParameters = (
|
11429
|
+
typeAliasTypeVar.details.recursiveTypeParameters = (_a = rightHandType.typeAliasInfo) === null || _a === void 0 ? void 0 : _a.typeParameters;
|
11440
11430
|
}
|
11441
11431
|
}
|
11442
11432
|
}
|
@@ -12378,9 +12368,19 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
12378
12368
|
});
|
12379
12369
|
const errorNode = argList.length > 0 ? (_b = (_a = argList[0].node) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : node.name : node.name;
|
12380
12370
|
let newMethodMember;
|
12371
|
+
// See if the class has a metaclass that overrides `__new__`. If so, we
|
12372
|
+
// will validate the signature of the `__new__` method.
|
12381
12373
|
if (classType.details.effectiveMetaclass && (0, types_1.isClass)(classType.details.effectiveMetaclass)) {
|
12382
|
-
//
|
12383
|
-
|
12374
|
+
// If the metaclass is 'type' or 'ABCMeta', we'll assume it will call through to
|
12375
|
+
// __init_subclass__, so we'll skip the `__new__` method check. We need to exclude
|
12376
|
+
// TypedDict classes here because _TypedDict uses ABCMeta as its metaclass, but its
|
12377
|
+
// typeshed definition doesn't override __init_subclass__.
|
12378
|
+
const metaclassCallsInitSubclass = types_1.ClassType.isBuiltIn(classType.details.effectiveMetaclass, ['ABCMeta', 'type']) &&
|
12379
|
+
!types_1.ClassType.isTypedDictClass(classType);
|
12380
|
+
if (!metaclassCallsInitSubclass) {
|
12381
|
+
// See if the metaclass has a `__new__` method that accepts keyword parameters.
|
12382
|
+
newMethodMember = (0, typeUtils_1.lookUpClassMember)(classType.details.effectiveMetaclass, '__new__', 8 /* MemberAccessFlags.SkipTypeBaseClass */);
|
12383
|
+
}
|
12384
12384
|
}
|
12385
12385
|
if (newMethodMember) {
|
12386
12386
|
const newMethodType = getTypeOfMember(newMethodMember);
|
@@ -12474,7 +12474,6 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
12474
12474
|
});
|
12475
12475
|
}
|
12476
12476
|
function getTypeOfFunction(node) {
|
12477
|
-
var _a;
|
12478
12477
|
initializedBasicTypes(node);
|
12479
12478
|
// Is this predecorated function type cached?
|
12480
12479
|
let functionType = readTypeCache(node.name, 0 /* EvaluatorFlags.None */);
|
@@ -12522,11 +12521,6 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
12522
12521
|
decoratedType = newDecoratedType;
|
12523
12522
|
}
|
12524
12523
|
}
|
12525
|
-
// In case this is an enum class and a method wrapped in an enum.member.
|
12526
|
-
decoratedType =
|
12527
|
-
(_a = (0, enums_1.transformTypeForPossibleEnumClass)(evaluatorInterface, node, node.name, () => {
|
12528
|
-
return { assignedType: decoratedType };
|
12529
|
-
})) !== null && _a !== void 0 ? _a : decoratedType;
|
12530
12524
|
// See if there are any overloads provided by previous function declarations.
|
12531
12525
|
if ((0, types_1.isFunction)(decoratedType)) {
|
12532
12526
|
decoratedType.details.deprecatedMessage = functionType.details.deprecatedMessage;
|
@@ -12824,6 +12818,13 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
12824
12818
|
functionType.details.flags |= 32768 /* FunctionTypeFlags.SkipArgsKwargsCompatibilityCheck */;
|
12825
12819
|
}
|
12826
12820
|
}
|
12821
|
+
// If the function contains an *args and a **kwargs parameter and both
|
12822
|
+
// are annotated as Any or are unannotated, make it exempt from
|
12823
|
+
// args/kwargs compatibility checks.
|
12824
|
+
const variadicsWithAnyType = functionType.details.parameters.filter((param) => param.category !== 0 /* ParameterCategory.Simple */ && param.name && (0, types_1.isAnyOrUnknown)(param.type));
|
12825
|
+
if (variadicsWithAnyType.length >= 2) {
|
12826
|
+
functionType.details.flags |= 32768 /* FunctionTypeFlags.SkipArgsKwargsCompatibilityCheck */;
|
12827
|
+
}
|
12827
12828
|
// If there was a defined return type, analyze that first so when we
|
12828
12829
|
// walk the contents of the function, return statements can be
|
12829
12830
|
// validated against this type.
|
@@ -12853,7 +12854,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
12853
12854
|
}
|
12854
12855
|
// Accumulate any type parameters used in the return type.
|
12855
12856
|
if (functionType.details.declaredReturnType && returnTypeAnnotationNode) {
|
12856
|
-
|
12857
|
+
(0, typeUtils_1.addTypeVarsToListIfUnique)(typeParametersSeen, (0, typeUtils_1.getTypeVarArgumentsRecursive)(functionType.details.declaredReturnType), functionType.details.typeVarScopeId);
|
12857
12858
|
}
|
12858
12859
|
// If the return type is explicitly annotated as a generator, mark the
|
12859
12860
|
// function as a generator even though it may not contain a "yield" statement.
|
@@ -12894,34 +12895,6 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
12894
12895
|
}
|
12895
12896
|
}
|
12896
12897
|
}
|
12897
|
-
// If the declared return type of a function contains type variables that
|
12898
|
-
// are found nowhere else in the signature and are contained within a
|
12899
|
-
// Callable, these type variables are "rescoped" from the function to
|
12900
|
-
// the Callable.
|
12901
|
-
function rescopeTypeVarsForCallableReturnType(returnType, functionType, typeParametersSeen) {
|
12902
|
-
const typeVarsInReturnType = (0, typeUtils_1.getTypeVarArgumentsRecursive)(returnType).filter((t) => t.scopeId === functionType.details.typeVarScopeId);
|
12903
|
-
const rescopedTypeVars = [];
|
12904
|
-
typeVarsInReturnType.forEach((typeVar) => {
|
12905
|
-
if (types_1.TypeBase.isInstantiable(typeVar)) {
|
12906
|
-
typeVar = types_1.TypeVarType.cloneAsInstance(typeVar);
|
12907
|
-
}
|
12908
|
-
// If this type variable was already seen in one or more input parameters,
|
12909
|
-
// don't attempt to rescope it.
|
12910
|
-
if (typeParametersSeen.some((tp) => (0, types_1.isTypeSame)((0, typeUtils_1.convertToInstance)(tp), typeVar))) {
|
12911
|
-
return;
|
12912
|
-
}
|
12913
|
-
// Is this type variable seen outside of a single callable?
|
12914
|
-
if ((0, typeUtils_1.isTypeVarLimitedToCallable)(returnType, typeVar)) {
|
12915
|
-
rescopedTypeVars.push(typeVar);
|
12916
|
-
}
|
12917
|
-
});
|
12918
|
-
(0, typeUtils_1.addTypeVarsToListIfUnique)(typeParametersSeen, typeVarsInReturnType);
|
12919
|
-
// Note that the type parameters have been rescoped so they are not
|
12920
|
-
// considered valid for the body of this function.
|
12921
|
-
if (rescopedTypeVars.length > 0) {
|
12922
|
-
functionType.details.rescopedTypeParameters = rescopedTypeVars;
|
12923
|
-
}
|
12924
|
-
}
|
12925
12898
|
function adjustParameterAnnotatedType(param, type) {
|
12926
12899
|
var _a;
|
12927
12900
|
// PEP 484 indicates that if a parameter has a default value of 'None'
|
@@ -15039,7 +15012,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
15039
15012
|
return declarations;
|
15040
15013
|
}
|
15041
15014
|
function getTypeForDeclaration(declaration) {
|
15042
|
-
var _a, _b
|
15015
|
+
var _a, _b;
|
15043
15016
|
switch (declaration.type) {
|
15044
15017
|
case 0 /* DeclarationType.Intrinsic */: {
|
15045
15018
|
if (declaration.intrinsicType === 'Any') {
|
@@ -15146,16 +15119,6 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
15146
15119
|
});
|
15147
15120
|
}
|
15148
15121
|
if (declaredType) {
|
15149
|
-
// Apply enum transform if appropriate.
|
15150
|
-
if (declaration.node.nodeType === 38 /* ParseNodeType.Name */) {
|
15151
|
-
const variableNode = (_c = ParseTreeUtils.getParentNodeOfType(declaration.node, 3 /* ParseNodeType.Assignment */)) !== null && _c !== void 0 ? _c : ParseTreeUtils.getParentNodeOfType(declaration.node, 54 /* ParseNodeType.TypeAnnotation */);
|
15152
|
-
if (variableNode) {
|
15153
|
-
declaredType =
|
15154
|
-
(_d = (0, enums_1.transformTypeForPossibleEnumClass)(evaluatorInterface, variableNode, declaration.node, () => {
|
15155
|
-
return { declaredType };
|
15156
|
-
})) !== null && _d !== void 0 ? _d : declaredType;
|
15157
|
-
}
|
15158
|
-
}
|
15159
15122
|
if ((0, types_1.isClassInstance)(declaredType) && types_1.ClassType.isBuiltIn(declaredType, 'TypeAlias')) {
|
15160
15123
|
return { type: undefined, isTypeAlias: true };
|
15161
15124
|
}
|
@@ -15295,7 +15258,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
15295
15258
|
return typeVar;
|
15296
15259
|
}
|
15297
15260
|
function getInferredTypeOfDeclaration(symbol, decl) {
|
15298
|
-
var _a, _b, _c
|
15261
|
+
var _a, _b, _c;
|
15299
15262
|
const resolvedDecl = resolveAliasDeclaration(decl, /* resolveLocalNames */ true, {
|
15300
15263
|
allowExternallyHiddenAccess: AnalyzerNodeInfo.getFileInfo(decl.node).isStubFile,
|
15301
15264
|
});
|
@@ -15418,25 +15381,6 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
15418
15381
|
let inferredType = (_c = evaluateTypeForSubnode(resolvedDecl.node, () => {
|
15419
15382
|
evaluateTypesForStatement(typeSource);
|
15420
15383
|
})) === null || _c === void 0 ? void 0 : _c.type;
|
15421
|
-
if (inferredType && resolvedDecl.node.nodeType === 38 /* ParseNodeType.Name */) {
|
15422
|
-
const variableNode = (_d = ParseTreeUtils.getParentNodeOfType(resolvedDecl.node, 3 /* ParseNodeType.Assignment */)) !== null && _d !== void 0 ? _d : ParseTreeUtils.getParentNodeOfType(resolvedDecl.node, 54 /* ParseNodeType.TypeAnnotation */);
|
15423
|
-
if (variableNode) {
|
15424
|
-
// See if this is an enum member. If so, we need to handle it as a special case.
|
15425
|
-
const enumMemberType = (0, enums_1.transformTypeForPossibleEnumClass)(evaluatorInterface, variableNode, resolvedDecl.node, () => {
|
15426
|
-
var _a, _b;
|
15427
|
-
(0, debug_1.assert)(resolvedDecl.inferredTypeSource !== undefined);
|
15428
|
-
const inferredTypeSource = resolvedDecl.inferredTypeSource;
|
15429
|
-
return {
|
15430
|
-
assignedType: (_b = (_a = evaluateTypeForSubnode(inferredTypeSource, () => {
|
15431
|
-
evaluateTypesForStatement(inferredTypeSource);
|
15432
|
-
})) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : types_1.UnknownType.create(),
|
15433
|
-
};
|
15434
|
-
});
|
15435
|
-
if (enumMemberType) {
|
15436
|
-
inferredType = enumMemberType;
|
15437
|
-
}
|
15438
|
-
}
|
15439
|
-
}
|
15440
15384
|
if (inferredType && isTypeAlias && resolvedDecl.typeAliasName) {
|
15441
15385
|
// If this was a speculative type alias, it becomes a real type alias only
|
15442
15386
|
// in the event that its inferred type is instantiable or explicitly Any
|
@@ -16782,7 +16726,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
16782
16726
|
// in the dest type is not in the type map already, it is assigned a type
|
16783
16727
|
// and added to the map.
|
16784
16728
|
function assignType(destType, srcType, diag, destTypeVarContext, srcTypeVarContext, flags = 0 /* AssignTypeFlags.Default */, recursionCount = 0) {
|
16785
|
-
var _a, _b;
|
16729
|
+
var _a, _b, _c;
|
16786
16730
|
// Handle the case where the dest and src types are the same object.
|
16787
16731
|
// We can normally shortcut this and say that they are compatible,
|
16788
16732
|
// but if the type includes TypeVars, we need to go through
|
@@ -17111,6 +17055,9 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
17111
17055
|
return false;
|
17112
17056
|
}
|
17113
17057
|
}
|
17058
|
+
if (types_1.ClassType.isBuiltIn(destType, 'type') && ((_c = srcType.instantiableNestingLevel) !== null && _c !== void 0 ? _c : 0) > 0) {
|
17059
|
+
return true;
|
17060
|
+
}
|
17114
17061
|
if (!isSpecialFormClass(expandedSrcType, flags) &&
|
17115
17062
|
assignClass(destType, expandedSrcType, diag, destTypeVarContext, srcTypeVarContext, flags, recursionCount,
|
17116
17063
|
/* reportErrorsUsingObjType */ false)) {
|
@@ -17841,21 +17788,14 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
17841
17788
|
}
|
17842
17789
|
}
|
17843
17790
|
if (!assignType(specializedSrcType, specializedDestType, diag === null || diag === void 0 ? void 0 : diag.createAddendum(), srcTypeVarContext, destTypeVarContext, flags, recursionCount)) {
|
17844
|
-
|
17845
|
-
|
17846
|
-
|
17847
|
-
|
17848
|
-
|
17849
|
-
|
17850
|
-
if (diag && paramIndex !== undefined) {
|
17851
|
-
diag.addMessage(localize_1.LocAddendum.paramAssignment().format({
|
17852
|
-
index: paramIndex + 1,
|
17853
|
-
sourceType: printType(destType),
|
17854
|
-
destType: printType(srcType),
|
17855
|
-
}));
|
17856
|
-
}
|
17857
|
-
return false;
|
17791
|
+
if (diag && paramIndex !== undefined) {
|
17792
|
+
diag.addMessage(localize_1.LocAddendum.paramAssignment().format({
|
17793
|
+
index: paramIndex + 1,
|
17794
|
+
sourceType: printType(destType),
|
17795
|
+
destType: printType(srcType),
|
17796
|
+
}));
|
17858
17797
|
}
|
17798
|
+
return false;
|
17859
17799
|
}
|
17860
17800
|
return true;
|
17861
17801
|
}
|
@@ -17883,6 +17823,12 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
17883
17823
|
if (srcLastToPackIndex < 0) {
|
17884
17824
|
srcLastToPackIndex = srcDetails.params.length;
|
17885
17825
|
}
|
17826
|
+
// If both the source and dest have an *args parameter but the dest's is
|
17827
|
+
// in a later position, then we can't assign the source's *args to the dest.
|
17828
|
+
// Don't make any adjustment in this case.
|
17829
|
+
if (srcDetails.argsIndex !== undefined && destDetails.argsIndex > srcDetails.argsIndex) {
|
17830
|
+
return;
|
17831
|
+
}
|
17886
17832
|
const destFirstNonPositional = (_a = destDetails.firstKeywordOnlyIndex) !== null && _a !== void 0 ? _a : destDetails.params.length;
|
17887
17833
|
const suffixLength = destFirstNonPositional - destDetails.argsIndex - 1;
|
17888
17834
|
const srcPositionalsToPack = srcDetails.params.slice(destDetails.argsIndex, srcLastToPackIndex - suffixLength);
|
@@ -17936,7 +17882,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
17936
17882
|
}
|
17937
17883
|
}
|
17938
17884
|
function assignFunction(destType, srcType, diag, destTypeVarContext, srcTypeVarContext, flags, recursionCount) {
|
17939
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
17885
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
17940
17886
|
let canAssign = true;
|
17941
17887
|
const checkReturnType = (flags & 64 /* AssignTypeFlags.SkipFunctionReturnTypeCheck */) === 0;
|
17942
17888
|
const reverseMatching = (flags & 2 /* AssignTypeFlags.ReverseTypeVarMatching */) !== 0;
|
@@ -18010,7 +17956,10 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
18010
17956
|
destParam.param.hasDeclaredType) {
|
18011
17957
|
continue;
|
18012
17958
|
}
|
18013
|
-
if (
|
17959
|
+
if ((0, types_1.isUnpacked)(srcParamType)) {
|
17960
|
+
canAssign = false;
|
17961
|
+
}
|
17962
|
+
else if (!assignFunctionParameter(destParamType, srcParamType, paramIndex, diag === null || diag === void 0 ? void 0 : diag.createAddendum(), destTypeVarContext, srcTypeVarContext, flags, recursionCount)) {
|
18014
17963
|
// Handle the special case where the source parameter is a synthesized
|
18015
17964
|
// TypeVar for "self" or "cls".
|
18016
17965
|
if ((flags & 512 /* AssignTypeFlags.SkipSelfClsTypeCheck */) === 0 ||
|
@@ -18019,6 +17968,17 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
18019
17968
|
canAssign = false;
|
18020
17969
|
}
|
18021
17970
|
}
|
17971
|
+
else if (destParam.source !== parameterUtils_1.ParameterSource.PositionOnly &&
|
17972
|
+
srcParam.source === parameterUtils_1.ParameterSource.PositionOnly &&
|
17973
|
+
srcParamDetails.kwargsIndex === undefined &&
|
17974
|
+
!srcParamDetails.params.some((p) => p.source === parameterUtils_1.ParameterSource.KeywordOnly &&
|
17975
|
+
p.param.category === 0 /* ParameterCategory.Simple */ &&
|
17976
|
+
p.param.name === destParam.param.name)) {
|
17977
|
+
diag === null || diag === void 0 ? void 0 : diag.addMessage(localize_1.LocAddendum.namedParamMissingInSource().format({
|
17978
|
+
name: (_e = destParam.param.name) !== null && _e !== void 0 ? _e : '',
|
17979
|
+
}));
|
17980
|
+
canAssign = false;
|
17981
|
+
}
|
18022
17982
|
}
|
18023
17983
|
if (!types_1.FunctionType.shouldSkipArgsKwargsCompatibilityCheck(destType) &&
|
18024
17984
|
destParamDetails.firstPositionOrKeywordIndex < srcParamDetails.positionOnlyParamCount &&
|
@@ -18082,7 +18042,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
18082
18042
|
if (destParamDetails.params[paramIndex].source !== parameterUtils_1.ParameterSource.PositionOnly &&
|
18083
18043
|
srcParamDetails.kwargsIndex === undefined) {
|
18084
18044
|
diag === null || diag === void 0 ? void 0 : diag.addMessage(localize_1.LocAddendum.namedParamMissingInSource().format({
|
18085
|
-
name: (
|
18045
|
+
name: (_f = destParamDetails.params[paramIndex].param.name) !== null && _f !== void 0 ? _f : '',
|
18086
18046
|
}));
|
18087
18047
|
canAssign = false;
|
18088
18048
|
}
|
@@ -18130,7 +18090,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
18130
18090
|
destParamDetails.argsIndex !== undefined &&
|
18131
18091
|
!destParamDetails.hasUnpackedVariadicTypeVar) {
|
18132
18092
|
diag === null || diag === void 0 ? void 0 : diag.createAddendum().addMessage(localize_1.LocAddendum.argsParamMissing().format({
|
18133
|
-
paramName: (
|
18093
|
+
paramName: (_g = destParamDetails.params[destParamDetails.argsIndex].param.name) !== null && _g !== void 0 ? _g : '',
|
18134
18094
|
}));
|
18135
18095
|
canAssign = false;
|
18136
18096
|
}
|
@@ -18243,7 +18203,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
|
|
18243
18203
|
// If the source and the dest are using the same ParamSpec, any additional
|
18244
18204
|
// concatenated parameters must match.
|
18245
18205
|
if (targetIncludesParamSpec &&
|
18246
|
-
((
|
18206
|
+
((_h = srcType.details.paramSpec) === null || _h === void 0 ? void 0 : _h.nameWithScope) === ((_j = destType.details.paramSpec) === null || _j === void 0 ? void 0 : _j.nameWithScope)) {
|
18247
18207
|
if (srcParamDetails.params.length !== destParamDetails.params.length) {
|
18248
18208
|
canAssign = false;
|
18249
18209
|
}
|