@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.
@@ -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();