Skip to content

Commit 23f8465

Browse files
committed
Add multiline type alias tests with line continuations
1 parent 2d99ef7 commit 23f8465

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
@@ -885,6 +885,14 @@ type X[T: (int, str), *Ts, **P] = (T, Ts, P)
885885
type type = int
886886
type match = int
887887
type case = int
888+
889+
# multine definitions
890+
type \
891+
X = int
892+
type X \
893+
= int
894+
type X = \
895+
int
888896
"#;
889897
insta::assert_debug_snapshot!(ast::Suite::parse(source, "<test>").unwrap());
890898
}

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)