Added some more cases to the match handling
This commit is contained in:
parent
99e6668c9a
commit
75a7a4499d
@ -195,10 +195,21 @@ fn reduce_if_expression(discriminator: &Discriminator, body: &IfExpressionBody,
|
||||
let (tag, bound_vars) = match arm.guard {
|
||||
Guard::Pat(ref p) => match p {
|
||||
Pattern::Ignored => (None, vec![]),
|
||||
Pattern::Literal(lit) => match lit {
|
||||
PatternLiteral::NumPattern(expr) => unimplemented!(),
|
||||
PatternLiteral::StringPattern(s) => unimplemented!(),
|
||||
PatternLiteral::BoolPattern(b) => unimplemented!(),
|
||||
PatternLiteral::VarPattern(var) => unimplemented!(),
|
||||
},
|
||||
Pattern::TuplePattern(_) => {
|
||||
unimplemented!()
|
||||
},
|
||||
_ => unimplemented!()
|
||||
Pattern::TupleStruct(name, subpatterns) => {
|
||||
unimplemented!()
|
||||
},
|
||||
Pattern::Record(name, pairs) => {
|
||||
unimplemented!()
|
||||
},
|
||||
},
|
||||
Guard::HalfExpr(HalfExpr { ref op, ref expr }) => {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user