@zzzen/pyright-internal 1.2.0-dev.20260719 → 1.2.0-dev.20260802
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/binder.js +5 -0
- package/dist/analyzer/binder.js.map +1 -1
- package/dist/analyzer/declaration.d.ts +2 -2
- package/dist/analyzer/declaration.js.map +1 -1
- package/dist/analyzer/patternMatching.js +23 -1
- package/dist/analyzer/patternMatching.js.map +1 -1
- package/dist/analyzer/typeEvaluator.js +95 -32
- package/dist/analyzer/typeEvaluator.js.map +1 -1
- package/dist/analyzer/typeGuards.js +26 -21
- package/dist/analyzer/typeGuards.js.map +1 -1
- package/dist/tests/typeEvaluator1.test.js +4 -0
- package/dist/tests/typeEvaluator1.test.js.map +1 -1
- package/dist/tests/typeEvaluator4.test.js +4 -0
- package/dist/tests/typeEvaluator4.test.js.map +1 -1
- package/package.json +1 -1
package/dist/analyzer/binder.js
CHANGED
|
@@ -443,6 +443,11 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
|
443
443
|
/* proxyScope */ undefined,
|
|
444
444
|
/* chainedModuleLevelScopeLookup */ undefined, () => {
|
|
445
445
|
AnalyzerNodeInfo.setScope(node, this._currentScope);
|
|
446
|
+
const enclosingClass = ParseTreeUtils.getEnclosingClass(node);
|
|
447
|
+
if (enclosingClass) {
|
|
448
|
+
// Lambdas create the same implicit __class__ closure as named functions.
|
|
449
|
+
this._addImplicitSymbolToCurrentScope('__class__', node, '__class__');
|
|
450
|
+
}
|
|
446
451
|
this._deferBinding(() => {
|
|
447
452
|
// Create a start node for the lambda.
|
|
448
453
|
this._currentFlowNode = this._createStartFlowNode();
|