Skip to content

Commit b079666

Browse files
authored
Fix TypeAliasName to store name instead of load (#99)
* Fix `TypeAliasName` to store name instead of load * Update snapshot tests
1 parent 704eb40 commit b079666

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

parser/src/python.lalrpop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ FuncDef: ast::Stmt = {
981981

982982
TypeAliasName: ast::Expr = {
983983
<location:@L> <name:Identifier> <end_location:@R> => ast::Expr::Name(
984-
ast::ExprName { id: name, ctx: ast::ExprContext::Load, range: (location..end_location).into() },
984+
ast::ExprName { id: name, ctx: ast::ExprContext::Store, range: (location..end_location).into() },
985985
),
986986
}
987987

parser/src/python.rs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

parser/src/snapshots/rustpython_parser__parser__tests__parse_type_declaration.snap

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)