Closed
Description
If part of a tuple is already "mentioned" in a match (but the match misses because of the rest of the tuple), it then won't match on a later range either, regardless of whether it should.
Best demonstrated by example:
fn main() {
let x = 1;
let y = 2;
let z = match (x,y) {
(1,1) => 1,
(2,2) => 2,
(1..2,2) => 3,
(_,_) => fail!("Shouldn't reach here but does")
};
}
Metadata
Metadata
Assignees
Labels
No labels