mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Able variables that are never used can become void
This commit is contained in:
parent
f3a6b45452
commit
bc2f4569aa
1 changed files with 10 additions and 1 deletions
|
@ -2214,7 +2214,16 @@ impl<'a> Layout<'a> {
|
|||
// completely, but for now we represent it with the empty tag union
|
||||
cacheable(Ok(Layout::VOID))
|
||||
}
|
||||
FlexAbleVar(_, _) | RigidAbleVar(_, _) => todo_abilities!("Not reachable yet"),
|
||||
FlexAbleVar(_, _) | RigidAbleVar(_, _) => {
|
||||
roc_debug_flags::dbg_do!(roc_debug_flags::ROC_NO_UNBOUND_LAYOUT, {
|
||||
return todo_abilities!("Able var is unbound!");
|
||||
});
|
||||
|
||||
// If we encounter an unbound type var (e.g. `*` or `a`)
|
||||
// then it's zero-sized; In the future we may drop this argument
|
||||
// completely, but for now we represent it with the empty tag union
|
||||
cacheable(Ok(Layout::VOID))
|
||||
}
|
||||
RecursionVar { structure, .. } => {
|
||||
let structure_content = env.subs.get_content_without_compacting(structure);
|
||||
Self::new_help(env, structure, *structure_content)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue