chore: use unreachable! for unreachable cases, not silent fallback (#9790)

This commit is contained in:
Cameron Zwarich 2025-08-07 08:23:01 -07:00 committed by GitHub
parent eaec888dc3
commit a2f24fac65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -288,7 +288,7 @@ partial def visitFnBody (b : FnBody) (ctx : Context) : FnBody × LiveVarSet :=
let bLiveVars := collectLiveVars b ctx.jpLiveVarMap
⟨b, bLiveVars⟩
| .unreachable => ⟨.unreachable, {}⟩
| _ => ⟨b, {}⟩ -- unreachable if well-formed
| .set .. | .setTag .. | .inc .. | .dec .. | .del .. => unreachable!
partial def visitDecl (env : Environment) (decls : Array Decl) (d : Decl) : Decl :=
match d with