aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/lsp/testdata/stub/stub_add_selector.go
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-16 14:15:45 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-16 14:15:45 +0000
commitcd3c7908c2ca750b27d330b4d257edc6818c4a5d (patch)
tree194d7b0e539d014393564a256bec571e18d6533a /gopls/internal/lsp/testdata/stub/stub_add_selector.go
parent3225eca48f7ce16eb31b2dd5a170806c1214a49e (diff)
parent09c5a32afc5b66f28f166a68afe1fc71afbf9b73 (diff)
downloadgolang-x-tools-cd3c7908c2ca750b27d330b4d257edc6818c4a5d.tar.gz
Snap for 9757917 from 09c5a32afc5b66f28f166a68afe1fc71afbf9b73 to build-tools-releasebuild-tools-release
Change-Id: If48e809642d94de846f47e34b88e446095e21aa5
Diffstat (limited to 'gopls/internal/lsp/testdata/stub/stub_add_selector.go')
-rw-r--r--gopls/internal/lsp/testdata/stub/stub_add_selector.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/gopls/internal/lsp/testdata/stub/stub_add_selector.go b/gopls/internal/lsp/testdata/stub/stub_add_selector.go
new file mode 100644
index 000000000..4037b7ad3
--- /dev/null
+++ b/gopls/internal/lsp/testdata/stub/stub_add_selector.go
@@ -0,0 +1,12 @@
+package stub
+
+import "io"
+
+// This file tests that if an interface
+// method references a type from its own package
+// then our implementation must add the import/package selector
+// in the concrete method if the concrete type is outside of the interface
+// package
+var _ io.ReaderFrom = &readerFrom{} //@suggestedfix("&readerFrom", "refactor.rewrite", "")
+
+type readerFrom struct{}