Allow type variable tuple for *args

This commit is contained in:
Charlie Marsh 2023-02-23 08:37:44 -05:00
parent f43e5b72e2
commit 0d7b94817d
3 changed files with 214 additions and 7 deletions

View file

@ -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>",
)