fix: recursively process jmp args in LCNF.toMono (#8521)

This PR makes LCNF.toMono recursively process jmp args.
This commit is contained in:
Cameron Zwarich 2025-05-28 13:56:03 -07:00 committed by GitHub
parent c3a010a938
commit 5814c1e757
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -221,7 +221,8 @@ partial def Code.toMono (code : Code) : ToMonoM Code := do
| .let decl k => return code.updateLet! (← decl.toMono) (← k.toMono)
| .fun decl k | .jp decl k => return code.updateFun! (← decl.toMono) (← k.toMono)
| .unreach type => return .unreach (← toMonoType type)
| .return .. | .jmp .. => return code
| .jmp fvarId args => return code.updateJmp! fvarId (← args.mapM argToMono)
| .return .. => return code
| .cases c =>
if h : c.typeName == ``Decidable then
decToMono c h