aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/lsp/testdata/fillstruct/a3.go
diff options
context:
space:
mode:
Diffstat (limited to 'gopls/internal/lsp/testdata/fillstruct/a3.go')
-rw-r--r--gopls/internal/lsp/testdata/fillstruct/a3.go42
1 files changed, 42 insertions, 0 deletions
diff --git a/gopls/internal/lsp/testdata/fillstruct/a3.go b/gopls/internal/lsp/testdata/fillstruct/a3.go
new file mode 100644
index 000000000..59cd9fa28
--- /dev/null
+++ b/gopls/internal/lsp/testdata/fillstruct/a3.go
@@ -0,0 +1,42 @@
+package fillstruct
+
+import (
+ "go/ast"
+ "go/token"
+)
+
+type Foo struct {
+ A int
+}
+
+type Bar struct {
+ X *Foo
+ Y *Foo
+}
+
+var _ = Bar{} //@suggestedfix("}", "refactor.rewrite", "Fill")
+
+type importedStruct struct {
+ m map[*ast.CompositeLit]ast.Field
+ s []ast.BadExpr
+ a [3]token.Token
+ c chan ast.EmptyStmt
+ fn func(ast_decl ast.DeclStmt) ast.Ellipsis
+ st ast.CompositeLit
+}
+
+var _ = importedStruct{} //@suggestedfix("}", "refactor.rewrite", "Fill")
+
+type pointerBuiltinStruct struct {
+ b *bool
+ s *string
+ i *int
+}
+
+var _ = pointerBuiltinStruct{} //@suggestedfix("}", "refactor.rewrite", "Fill")
+
+var _ = []ast.BasicLit{
+ {}, //@suggestedfix("}", "refactor.rewrite", "Fill")
+}
+
+var _ = []ast.BasicLit{{}} //@suggestedfix("}", "refactor.rewrite", "Fill")