Skip to content

Commit 1622c8f

Browse files
committed
Add multiline type alias tests with line continuations
1 parent 7bbd80e commit 1622c8f

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

parser/src/parser.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,14 @@ type X[T: (int, str), *Ts, **P] = (T, Ts, P)
912912
type type = int
913913
type match = int
914914
type case = int
915+
916+
# multine definitions
917+
type \
918+
X = int
919+
type X \
920+
= int
921+
type X = \
922+
int
915923
"#;
916924
insta::assert_debug_snapshot!(ast::Suite::parse(source, "<test>").unwrap());
917925
}

parser/src/snapshots/rustpython_parser__parser__tests__parse_type_declaration.snap

Lines changed: 72 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)