chore: workaround for compiler closed term extraction issue
This commit is contained in:
parent
5948003601
commit
85a1a5233b
1 changed files with 4 additions and 1 deletions
|
|
@ -43,8 +43,11 @@ private def addDefault (alts : Array Alt) : Array Alt :=
|
|||
let alts := alts.filter fun alt => alt.body != max.body
|
||||
alts.push (Alt.default max.body)
|
||||
|
||||
private def filterUnreachable (alts : Array Alt) : Array Alt :=
|
||||
alts.filter fun alt => alt.body != FnBody.unreachable
|
||||
|
||||
private def mkSimpCase (tid : Name) (x : VarId) (xType : IRType) (alts : Array Alt) : FnBody :=
|
||||
let alts := alts.filter (fun alt => alt.body != FnBody.unreachable);
|
||||
let alts := filterUnreachable alts
|
||||
let alts := addDefault alts;
|
||||
if alts.size == 0 then
|
||||
FnBody.unreachable
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue