File: issue67360.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 (16 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Regression test for #67360.

This file causes go list to report a "use of internal package
cmd/internal/browser" error. (It is important that this be a real
internal std package.) The line directive caused the position of the
error to lack a column. A bug in the error parser filled in 0, not 1,
for the missing information, and this is an invalid value in the
1-based UTF-8 domain, leading to a panic.

-- flags --
-min_go=go1.21

-- foo.go --
//line foo.go:1
package main                    //@ diag(re"package", re"internal package.*not allowed")
import _ "cmd/internal/browser" //@ diag(re`"`, re"could not import")