// Regression: zero-binding closure not wrapped in SSAMakeClosure. // // The SSA builder's buildFuncLit returned a bare *SSAFunction for function // literals with zero captured variables. When this function was stored in a // variable and called, the emitter tried extractvalue {ptr,ptr} on the // loaded value, which was a ptr not {ptr,ptr}. // // Reproduces: function literal with zero free variables, stored and called. // Fixed in: pkg/ssa/ssa_builder.mx (SSAFunction now always wrapped). package main func main() { fn := func() { println("x") } fn() }