Provide error message here
This commit is contained in:
parent
6d18f80185
commit
0c0690e86e
@ -155,7 +155,7 @@ fn reduce_if_expression(discriminator: &Discriminator, body: &IfExpressionBody,
|
|||||||
|
|
||||||
let first_alt: Alternative = match pat {
|
let first_alt: Alternative = match pat {
|
||||||
Pattern::TupleStruct(name, subpatterns) => {
|
Pattern::TupleStruct(name, subpatterns) => {
|
||||||
let symbol = symbol_table.values.get(name).unwrap();
|
let symbol = symbol_table.values.get(name).expect(&format!("Symbol {} not found", name));
|
||||||
let tag = match symbol.spec {
|
let tag = match symbol.spec {
|
||||||
SymbolSpec::DataConstructor { index, .. } => index.clone(),
|
SymbolSpec::DataConstructor { index, .. } => index.clone(),
|
||||||
_ => panic!("Bad symbol"),
|
_ => panic!("Bad symbol"),
|
||||||
|
Loading…
Reference in New Issue
Block a user