Add test for type identifier assignment

This commit is contained in:
Zanie 2023-07-14 12:58:09 -05:00
parent 8e5d0cc385
commit 4776f689ae
2 changed files with 27 additions and 0 deletions

View file

@ -958,6 +958,7 @@ a = (
type (
X = int
)
type = 1
"#;
insta::assert_debug_snapshot!(ast::Suite::parse(source, "<test>").unwrap());
}

View file

@ -975,4 +975,30 @@ expression: "ast::Suite::parse(source, \"<test>\").unwrap()"
),
},
),
Assign(
StmtAssign {
range: 617..625,
targets: [
Name(
ExprName {
range: 617..621,
id: Identifier(
"type",
),
ctx: Store,
},
),
],
value: Constant(
ExprConstant {
range: 624..625,
value: Int(
1,
),
kind: None,
},
),
type_comment: None,
},
),
]