Skip to content
Permalink
Browse files

compiler: provide non-nil *token.FileSet to gcexportdata.Write

  • Loading branch information...
dmitshur committed Oct 4, 2019
1 parent 6009814 commit b0dba0ac2781f11a6717826e21b79b770085b4ba
Showing with 1 addition and 1 deletion.
  1. +1 −1 compiler/package.go
@@ -165,7 +165,7 @@ func Compile(importPath string, files []*ast.File, fileSet *token.FileSet, impor
importContext.Packages[importPath] = typesPkg

exportData := new(bytes.Buffer)
if err := gcexportdata.Write(exportData, nil, typesPkg); err != nil {
if err := gcexportdata.Write(exportData, token.NewFileSet(), typesPkg); err != nil {
return nil, fmt.Errorf("failed to write export data: %v", err)
}
encodedFileSet := new(bytes.Buffer)

0 comments on commit b0dba0a

Please sign in to comment.
You can’t perform that action at this time.