Skip to content

Commit

Permalink
cmd/compile: remove redundant function pkgNameOf
Browse files Browse the repository at this point in the history
The decl.go file in cmd/compile/internal/noder has been removed as its
only contained function, pkgNameOf, is now redundant. This change updates
the references of this function to use the method PkgNameOf directly from
the *types2.Info struct.

For #62037
  • Loading branch information
aimuz committed Nov 12, 2023
1 parent 8da6405 commit 3c8928f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
18 changes: 0 additions & 18 deletions src/cmd/compile/internal/noder/decl.go

This file was deleted.

2 changes: 1 addition & 1 deletion src/cmd/compile/internal/noder/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2484,7 +2484,7 @@ func (c *declCollector) Visit(n syntax.Node) syntax.Visitor {
case *syntax.ImportDecl:
pw.checkPragmas(n.Pragma, 0, false)

switch pkgNameOf(pw.info, n).Imported().Path() {
switch pw.info.PkgNameOf(n).Imported().Path() {
case "embed":
c.file.importedEmbed = true
case "unsafe":
Expand Down

0 comments on commit 3c8928f

Please sign in to comment.