Drop another unused branch

This commit is contained in:
Ayaz Hafiz 2022-05-07 15:04:35 -04:00
parent 7e58c4ddea
commit 19175a85d8
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -5867,7 +5867,9 @@ pub fn from_can<'a>(
Err(_) => todo!(), Err(_) => todo!(),
}; };
if let Pattern::Identifier(_symbol) = mono_pattern { if matches!(mono_pattern, Pattern::Identifier(_symbol))
|| matches!(def.loc_expr.value, roc_can::expr::Expr::Var(..))
{
internal_error!("Identifier patterns should be handled in a higher code pass!") internal_error!("Identifier patterns should be handled in a higher code pass!")
} }
@ -5895,9 +5897,6 @@ pub fn from_can<'a>(
); );
} }
if let roc_can::expr::Expr::Var(outer_symbol) = def.loc_expr.value {
store_pattern(env, procs, layout_cache, &mono_pattern, outer_symbol, stmt)
} else {
let outer_symbol = env.unique_symbol(); let outer_symbol = env.unique_symbol();
stmt = store_pattern(env, procs, layout_cache, &mono_pattern, outer_symbol, stmt); stmt = store_pattern(env, procs, layout_cache, &mono_pattern, outer_symbol, stmt);
@ -5912,7 +5911,6 @@ pub fn from_can<'a>(
env.arena.alloc(stmt), env.arena.alloc(stmt),
) )
} }
}
_ => { _ => {
let symbol = env.unique_symbol(); let symbol = env.unique_symbol();