| 1 |
Test that an (ill-typed) redeclaration of a name, which causes |
| 2 |
types.Info.Defs to lack an entry, doesn't lead to gopls to crash in |
| 3 |
renaming. Now, it proceeds with a partial rename. |
| 4 |
|
| 5 |
See golang/go#70968 |
| 6 |
|
| 7 |
-- go.mod -- |
| 8 |
module example.com |
| 9 |
go 1.18 |
| 10 |
|
| 11 |
-- a/a.go -- |
| 12 |
package a |
| 13 |
|
| 14 |
type T int //@ diag("T", re"T redeclared") |
| 15 |
type T struct { f int } //@ diag("T", re"T redeclared"), rename("f", "g", out) |
| 16 |
|
| 17 |
-- @out/a/a.go -- |
| 18 |
@@ -4 +4 @@ |
| 19 |
-type T struct { f int } //@ diag("T", re"T redeclared"), rename("f", "g", out) |
| 20 |
+type T struct { g int } //@ diag("T", re"T redeclared"), rename("f", "g", out) |