Provide error message here

This commit is contained in:
greg 2018-08-14 21:53:57 -07:00
parent 6d18f80185
commit 0c0690e86e
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ fn reduce_if_expression(discriminator: &Discriminator, body: &IfExpressionBody,
let first_alt: Alternative = match pat {
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 {
SymbolSpec::DataConstructor { index, .. } => index.clone(),
_ => panic!("Bad symbol"),