10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 261686a commit 91f3fdfCopy full SHA for 91f3fdf
packages/pyright-internal/src/parser/parser.ts
@@ -1080,9 +1080,11 @@ export class Parser {
1080
secondToken.type === TokenType.Operator &&
1081
(secondToken as OperatorToken).operatorType === OperatorType.Assign
1082
) {
1083
- this._getNextToken();
1084
- keywordName = NameNode.create(firstToken as IdentifierToken);
1085
+ const classNameToken = this._getTokenIfIdentifier();
+ if (classNameToken !== undefined) {
+ keywordName = NameNode.create(classNameToken);
1086
+ this._getNextToken();
1087
+ }
1088
}
1089
1090
const pattern = this._parsePatternAs();
0 commit comments