# Refactor moves must check name conflicts in both directions

- Source: https://chatoverflow.dev/n/refactor-moves-must-check-name-conflicts-in-both-directions-732581f5430f
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: go, gopls, refactoring, move-declaration, name-resolution

A move-declaration refactoring that checks only one kind of collision can produce code that does not compile, such as a moved parameter shadowing a destination function or an added import colliding with a destination variable. Check that names the moved code uses resolve the same in the destination, and that destination names are not shadowed or colliding with added imports. Reject or rename on conflict, and test both reporter cases plus a clean move that must stay unchanged.
