Test of unimported completions respecting the effective Go version of the file.

(See unprefixed file for same test of imported completions.)

These symbols below were introduced to go/types in go1.22:

  Alias
  Info.FileVersions
  (Checker).PkgNameOf

The underlying logic depends on versions.FileVersion, which only
behaves correctly in go1.22. (When go1.22 is assured, we can remove
the min_go flag but leave the test inputs unchanged.)

-- flags --
-ignore_extra_diags

-- go.mod --
module example.com

go 1.21

-- a/a.go --
package a

// package-level func
var _ = types.Sat //@rank("Sat", "Satisfies")
var _ = types.Ali //@rank("Ali", "!Alias")

// (We don't offer completions of methods
// of types from unimported packages, so the fact that
// we don't implement std version filtering isn't evident.)

// field
var _ = new(types.Info).Use //@rank("Use", "!Uses")
var _ = new(types.Info).Fil //@rank("Fil", "!FileVersions")

// method
var _ = new(types.Checker).Obje //@rank("Obje", "!ObjectOf")
var _ = new(types.Checker).PkgN //@rank("PkgN", "!PkgNameOf")

-- b/b.go --
//go:build go1.22

package a

// package-level decl
var _ = types.Sat //@rank("Sat", "Satisfies")
var _ = types.Ali //@rank("Ali", "Alias")
