aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/lsp/testdata/fillstruct/fill_struct_partial.go
diff options
context:
space:
mode:
Diffstat (limited to 'gopls/internal/lsp/testdata/fillstruct/fill_struct_partial.go')
-rw-r--r--gopls/internal/lsp/testdata/fillstruct/fill_struct_partial.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/gopls/internal/lsp/testdata/fillstruct/fill_struct_partial.go b/gopls/internal/lsp/testdata/fillstruct/fill_struct_partial.go
new file mode 100644
index 000000000..5de1722c7
--- /dev/null
+++ b/gopls/internal/lsp/testdata/fillstruct/fill_struct_partial.go
@@ -0,0 +1,24 @@
+package fillstruct
+
+type StructPartialA struct {
+ PrefilledInt int
+ UnfilledInt int
+ StructPartialB
+}
+
+type StructPartialB struct {
+ PrefilledInt int
+ UnfilledInt int
+}
+
+func fill() {
+ a := StructPartialA{
+ PrefilledInt: 5,
+ } //@suggestedfix("}", "refactor.rewrite", "Fill")
+ b := StructPartialB{
+ /* this comment should disappear */
+ PrefilledInt: 7, // This comment should be blown away.
+ /* As should
+ this one */
+ } //@suggestedfix("}", "refactor.rewrite", "Fill")
+}