Add parenthized multiline type alias test case

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

View file

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

View file

@ -706,4 +706,28 @@ expression: "ast::Suite::parse(source, \"<test>\").unwrap()"
),
},
),
TypeAlias(
StmtTypeAlias {
range: 415..435,
name: Name(
ExprName {
range: 420..421,
id: Identifier(
"X",
),
ctx: Load,
},
),
type_params: [],
value: Name(
ExprName {
range: 430..433,
id: Identifier(
"int",
),
ctx: Load,
},
),
},
),
]