Add a test for slice patterns

This commit is contained in:
Seiichi Uchida 2018-08-12 23:55:34 +09:00
parent 66d3924aa8
commit 996dbbf960
2 changed files with 16 additions and 0 deletions

View File

@ -63,3 +63,11 @@ fn combine_patterns() {
_ => return,
};
}
fn slice_patterns() {
match b"123" {
[0, ..] => {}
[0, foo..] => {}
_ => {}
}
}

View File

@ -75,3 +75,11 @@ fn combine_patterns() {
_ => return,
};
}
fn slice_patterns() {
match b"123" {
[0, ..] => {}
[0, foo..] => {}
_ => {}
}
}