This test checks that gopls does not panic when requesting code actions for an import that fails to resolve a package name (such as renaming "C"). -- flags -- -cgo -- go.mod -- module example.com go 1.18 -- a.go -- package p //@ diag(re"^", re`cannot rename import "C"`), diag(re"^", re"go list failed") import . "C" //@ codeaction(".", "refactor.rewrite.eliminateDotImport", err="found 0 CodeActions"), diag(re`[.]`, re`cannot rename import "C"`)