Fix rest parsing (#4765)

* More nuon tests, fix table print

* Fix rest type parsing
This commit is contained in:
JT
2022-03-07 11:44:27 -05:00
committed by GitHub
parent 0b6b321ad6
commit a2723c2ba4
2 changed files with 42 additions and 27 deletions

View File

@ -339,3 +339,13 @@ fn string_escape() -> TestResult {
fn string_escape_interpolation() -> TestResult {
run_test(r#"$"\u015B(char hamburger)abc""#, "ś≡abc")
}
#[test]
fn proper_rest_types() -> TestResult {
run_test(
r#"def foo [--verbose(-v): bool, # my test flag
...rest: int # my rest comment
] { if $verbose { print "verbose!" } else { print "not verbose!" } }; foo"#,
"not verbose!",
)
}