Having a second thought, I wonder if we could "move" a declaration this way without breaking the ABI:
- Apply
@available(*, unavailable)
to the declaration in the declaring module, but keep the implementation. - Copy the declaration to the cross-import overlay.
Supposedly, the compiler would pick the definition in (2) because unavailability implies lowest overloading precedence. Meanwhile, since the declaration and its implementation is kept in the original module, it is still available in the ABI for earlier clients.
cc @beccadax