PY-74231 Fix false positive "Statement expected, found Py:DEDENT" for a nested type alias

GitOrigin-RevId: 03d64abe2c949a5912eb5c16ef48a5149568d66f
This commit is contained in:
Daniil Kalinin
2024-10-01 12:21:42 +02:00
committed by intellij-monorepo-bot
parent 2f492127fc
commit b934cfe38a
8 changed files with 225 additions and 0 deletions

View File

@@ -147,6 +147,7 @@ public class StatementParsing extends Parsing implements ITokenTypeRemapper {
parseTypeParameterList();
checkMatches(PyTokenTypes.EQ, PyParsingBundle.message("PARSE.eq.expected"));
myContext.getExpressionParser().parseExpression();
checkEndOfStatement();
mark.done(PyElementTypes.TYPE_ALIAS_STATEMENT);
return true;
}