github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/loader/loader_go122.go (about)

     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  }