mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-27 15:04:28 +00:00
Allow type variable tuple for *args
This commit is contained in:
parent
f43e5b72e2
commit
0d7b94817d
3 changed files with 214 additions and 7 deletions
|
@ -803,6 +803,18 @@ match x:
|
|||
match x:
|
||||
case (0,):
|
||||
y = 0
|
||||
"#,
|
||||
"<test>",
|
||||
)
|
||||
.unwrap();
|
||||
insta::assert_debug_snapshot!(parse_ast);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_variadic_generics() {
|
||||
let parse_ast = parse_program(
|
||||
r#"
|
||||
def args_to_tuple(*args: *Ts) -> Tuple[*Ts]: ...
|
||||
"#,
|
||||
"<test>",
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue