| 1 | package p |
| 2 | |
| 3 | // This verifies that the code works even through |
| 4 | // multiple levels of unexported types. |
| 5 | |
| 6 | // old |
| 7 | var Z w |
| 8 | |
| 9 | type w []x |
| 10 | type x []z |
| 11 | type z int |
| 12 | |
| 13 | // new |
| 14 | var Z w |
| 15 | |
| 16 | type w []x |
| 17 | type x []z |
| 18 | |
| 19 | // i z: changed from int to bool |
| 20 | type z bool |
| 21 | |
| 22 | // old |
| 23 | type H struct{} |
| 24 | |
| 25 | func (H) M() {} |
| 26 | |
| 27 | // new |
| 28 | // i H: changed from struct{} to interface{M()} |
| 29 | type H interface { |
| 30 | M() |
| 31 | } |