aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/lsp/testdata/stub/stub_renamed_import_iface.go.golden
diff options
context:
space:
mode:
Diffstat (limited to 'gopls/internal/lsp/testdata/stub/stub_renamed_import_iface.go.golden')
-rw-r--r--gopls/internal/lsp/testdata/stub/stub_renamed_import_iface.go.golden22
1 files changed, 22 insertions, 0 deletions
diff --git a/gopls/internal/lsp/testdata/stub/stub_renamed_import_iface.go.golden b/gopls/internal/lsp/testdata/stub/stub_renamed_import_iface.go.golden
new file mode 100644
index 000000000..d9c621584
--- /dev/null
+++ b/gopls/internal/lsp/testdata/stub/stub_renamed_import_iface.go.golden
@@ -0,0 +1,22 @@
+-- suggestedfix_stub_renamed_import_iface_11_25 --
+package stub
+
+import (
+ "bytes"
+ "context"
+ "golang.org/lsptests/stub/other"
+)
+
+// This file tests that if an interface
+// method references an import from its own package
+// that the concrete type does not yet import, and that import happens
+// to be renamed, then we prefer the renaming of the interface.
+var _ other.Interface = &otherInterfaceImpl{} //@suggestedfix("&otherInterfaceImpl", "refactor.rewrite", "")
+
+type otherInterfaceImpl struct{}
+
+// Get implements other.Interface
+func (*otherInterfaceImpl) Get(context.Context) *bytes.Buffer {
+ panic("unimplemented")
+}
+