loader_go122.go raw

   1  //go:build go1.22
   2  
   3  // types.Info.FileVersions was added in Go 1.22, so we can only initialize it
   4  // when built with Go 1.22.
   5  
   6  package loader
   7  
   8  import (
   9  	"go/ast"
  10  	"go/types"
  11  )
  12  
  13  func init() {
  14  	initFileVersions = func(info *types.Info) {
  15  		info.FileVersions = make(map[*ast.File]string)
  16  	}
  17  }
  18