Skip to content

Commit

Permalink
go/ir: actually build blank functions
Browse files Browse the repository at this point in the history
In d074ce0 we stopped dropping objects
with blank names on the floor. However, we forgot to actually build
functions with blank names, therefore exposing malformed Function
objects to users of go/ir.

Closes: gh-1572
(cherry picked from commit d0a0c65)
  • Loading branch information
dominikh committed Jul 8, 2024
1 parent 34db56d commit 0636bca
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions go/ir/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3303,9 +3303,6 @@ func (b *builder) buildYieldFunc(fn *Function) {
// by decl in package pkg.
func (b *builder) buildFuncDecl(pkg *Package, decl *ast.FuncDecl) {
id := decl.Name
if isBlankIdent(id) {
return // discard
}
fn := pkg.values[pkg.info.Defs[id]].(*Function)
if decl.Recv == nil && id.Name == "init" {
var v Call
Expand Down

0 comments on commit 0636bca

Please sign in to comment.