| 1 |
This is a test for issue 65098: a renaming in package a does not |
| 2 |
propagate to package b, even though the two packages are coupled via |
| 3 |
an assignment in c, which is renamed. |
| 4 |
|
| 5 |
c |
| 6 |
/ \ |
| 7 |
a b |
| 8 |
|
| 9 |
The bug (a dup of #58461) is not yet fixed, so the golden file records |
| 10 |
the wrong behavior (i.e. no changes to package b). |
| 11 |
TODO(adonovan): fix. |
| 12 |
|
| 13 |
-- go.mod -- |
| 14 |
module example.com |
| 15 |
go 1.12 |
| 16 |
|
| 17 |
-- a/a.go -- |
| 18 |
package a |
| 19 |
|
| 20 |
type I interface { |
| 21 |
F() //@ rename("F", "FF", fToFF) |
| 22 |
} |
| 23 |
|
| 24 |
-- b/b.go -- |
| 25 |
package b |
| 26 |
|
| 27 |
type S struct{} |
| 28 |
|
| 29 |
func (s S) F() {} |
| 30 |
|
| 31 |
-- c/c.go -- |
| 32 |
package c |
| 33 |
|
| 34 |
import ( |
| 35 |
"example.com/a" |
| 36 |
"example.com/b" |
| 37 |
) |
| 38 |
|
| 39 |
var _ a.I = b.S{} |
| 40 |
var _ = a.I.F |
| 41 |
|
| 42 |
-- @fToFF/a/a.go -- |
| 43 |
@@ -4 +4 @@ |
| 44 |
- F() //@ rename("F", "FF", fToFF) |
| 45 |
+ FF() //@ rename("F", "FF", fToFF) |
| 46 |
-- @fToFF/c/c.go -- |
| 47 |
@@ -9 +9 @@ |
| 48 |
-var _ = a.I.F |
| 49 |
+var _ = a.I.FF |