Skip to content

x/tools/gopls: rename: spurious pkgname conflict in xtest #67069

@adonovan

Description

@adonovan

The renamer reports a conflict where there would be none, when renaming AA in the program below to aa:

xtools$ pwd
/Users/adonovan/w/xtools

xtools$ cat aa/aa.go 
package aa

var AA int // renaming this var "AA" to "aa" would conflict...

const C = 0

xtools$ cat aa/aa_test.go 
package aa_test

import "golang.org/x/tools/aa" // ...with this imported package name

var _ = aa.C

xtools$ gopls rename ./aa/aa.go:#17 aa     # rename AA to aa
gopls: aa/aa.go:3:5: renaming this var "AA" to "aa" would conflict
aa/aa_test.go:3:8:	with this imported package name

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeRefactoringIssues related to refactoring toolsgoplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions