mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-29 14:54:56 +00:00
Add parenthized multiline type alias test case
This commit is contained in:
parent
e2e1c2b705
commit
8e5d0cc385
2 changed files with 27 additions and 0 deletions
|
@ -920,6 +920,9 @@ type X \
|
||||||
= int
|
= int
|
||||||
type X = \
|
type X = \
|
||||||
int
|
int
|
||||||
|
type X = (
|
||||||
|
int
|
||||||
|
)
|
||||||
"#;
|
"#;
|
||||||
insta::assert_debug_snapshot!(ast::Suite::parse(source, "<test>").unwrap());
|
insta::assert_debug_snapshot!(ast::Suite::parse(source, "<test>").unwrap());
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
},
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue