File: unimported-std.txt

package info (click to toggle)
golang-golang-x-tools 1%3A0.25.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 22,724 kB
  • sloc: javascript: 2,027; asm: 1,645; sh: 166; yacc: 155; makefile: 49; ansic: 8
file content (49 lines) | stat: -rw-r--r-- 1,235 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 -min_go=go1.22

-- 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")