Skip to content

Commit e2e1c2b

Browse files
committed
Add test for parenthized multiline type as identifier
1 parent 1622c8f commit e2e1c2b

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

parser/src/parser.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,9 @@ a = (
952952
a = (
953953
type(b)
954954
)
955+
type (
956+
X = int
957+
)
955958
"#;
956959
insta::assert_debug_snapshot!(ast::Suite::parse(source, "<test>").unwrap());
957960
}

parser/src/snapshots/rustpython_parser__parser__tests__type_as_identifier.snap

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

0 commit comments

Comments
 (0)