Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in createSelfType #9552

Open
rchiodo opened this issue Dec 5, 2024 · 0 comments
Open

Crash in createSelfType #9552

rchiodo opened this issue Dec 5, 2024 · 0 comments
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working

Comments

@rchiodo
Copy link
Collaborator

rchiodo commented Dec 5, 2024

This was logged in our crash telemetry for Pylance:

TypeError: Cannot read properties of undefined (reading 'node')
at node pyright-internal/src/analyzer/typeEvaluator.ts:15457:28
at createSelfType pyright-internal/src/analyzer/typeEvaluator.ts:20597:35
at createSpecializedClassType pyright-internal/src/analyzer/typeEvaluator.ts:7532:35
at callback pyright-internal/src/analyzer/typeUtils.ts:765:8
at expandedType pyright-internal/src/analyzer/typeEvaluator.ts:4096:16
at expandSubtype pyright-internal/src/analyzer/typeEvaluator.ts:4153:12
at mapSubtypesExpandTypeVars pyright-internal/src/analyzer/typeEvaluator.ts:7370:21
at getTypeOfIndexWithBaseType pyright-internal/src/analyzer/typeEvaluator.ts:6771:32
at node pyright-internal/src/analyzer/typeEvaluator.ts:1124:49
at getTypeOfExpression pyright-internal/src/analyzer/typeEvaluator.ts:21106:15
at getTypeOfExpressionExpectingType pyright-internal/src/analyzer/typeEvaluator.ts:1893:31
at cb pyright-internal/src/common/cancellationUtils.ts:32:15
at invalidateTypeCacheIfCanceled pyright-internal/src/analyzer/typeEvaluator.ts:18311:15
at getTypeOfFunctionPredecorated pyright-internal/src/analyzer/typeEvaluator.ts:18170:27
at callback pyright-internal/src/common/timing.ts:40:19
at getTypeOfFunction pyright-internal/src/analyzer/checker.ts:411:51
at visitFunction pyright-internal/src/analyzer/parseTreeWalker.ts:451:28
at visit pyright-internal/src/analyzer/parseTreeWalker.ts:933:20
at visitNode pyright-internal/src/analyzer/parseTreeWalker.ts:915:36
at walk pyright-internal/src/analyzer/checker.ts:284:18
at walk pyright-internal/src/analyzer/checker.ts:2799:17
at _walkStatementsAndReportUnreachable pyright-internal/src/analyzer/checker.ts:293:13
at visitSuite pyright-internal/src/analyzer/parseTreeWalker.ts:544:28
at visit pyright-internal/src/analyzer/parseTreeWalker.ts:933:20
at visitNode pyright-internal/src/analyzer/parseTreeWalker.ts:915:36
at walk pyright-internal/src/analyzer/checker.ts:284:18
at walk pyright-internal/src/analyzer/checker.ts:318:13
at visitClass pyright-internal/src/analyzer/parseTreeWalker.ts:388:28
at visit pyright-internal/src/analyzer/parseTreeWalker.ts:933:20

@rchiodo rchiodo added the bug Something isn't working label Dec 5, 2024
erictraut added a commit that referenced this issue Dec 6, 2024
…`Self` is errantly specialized. This addresses #9552.
@erictraut erictraut added the addressed in next version Issue is fixed and will appear in next published version label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants