chore: clean up loop over ctor fields (#9313)

This commit is contained in:
Cameron Zwarich 2025-07-11 09:46:48 -07:00 committed by GitHub
parent 837ea41ede
commit d4e11f754a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -178,9 +178,11 @@ partial def lowerLet (decl : LCNF.LetDecl) (k : LCNF.Code) : M FnBody := do
let irArgs := irArgs.extract (start := ctorVal.numParams)
let objArgs : Array Arg ← do
let mut result : Array Arg := #[]
for i in *...fields.size do
if fields[i]! matches .object .. then
for h : i in *...fields.size do
match fields[i] with
| .object .. =>
result := result.push irArgs[i]!
| .usize .. | .scalar .. | .irrelevant => pure ()
pure result
let objVar ← bindVar decl.fvarId
let rec lowerNonObjectFields (_ : Unit) : M FnBody :=