ssa: program.Closure, removeCtx for MakeClosure

This commit is contained in:
visualfc
2024-10-30 10:42:32 +08:00
parent df7e8b2e64
commit 014bdb795f
3 changed files with 6 additions and 9 deletions

View File

@@ -67,8 +67,7 @@ func (p Program) FuncDecl(sig *types.Signature, bg Background) Type {
}
// Closure creates a closture type for a function.
func (p Program) Closure(fn Type) Type {
sig := fn.raw.Type.(*types.Signature)
func (p Program) Closure(sig *types.Signature) Type {
closure := p.gocvt.cvtClosure(sig)
return p.rawType(closure)
}