Does $\overline{A+B}=\overline A+\overline B$ hold if $\overline A$ and $\overline B$ are compact? Let us assume that we are working with subsets $A$, $B$ of some topological space $X$ such that also $A+B$ makes sense. (For example, we can have $X=\mathbb R^n$, $X$ could be a topological group, a topological vector space or a linear normed space. I do not want to make the question too narrow, so I am formulating this in a way which admits various contexts in answers.)
It is well known that the equality $$\overline{A+B}=\overline A+\overline B$$ does not hold in general.1 Could we still have this equality at least if both $\overline A$ and $\overline B$ are compact? Does it suffice to require one of these two sets (either $\overline A$ or $\overline B$) to be compact?


*

*My impression is that this should be true if both of them are compact subsets of a metric commutative topological group (where the metric is invariant w.r.t. the binary operation $+$). In particular, this should be true for linear normed spaces. I think that the proof along these lines should work: If we are given a sequence $x_n$ of points belonging to $\overline{A+B}$, then we have $a_n\in A$, $b_n\in B$ such that $d(a_n+b_n,x_n)<\frac1n$. By taking a convergent subsequence $a_{n_k}$ of $a_n$ and then again a convergent subsequence of $b_{n_k}$ we can get a subsequence of $x_n$ which is convergent. But I do not immediately see whether I could do the analogous proof for arbitrary topological group with nets and subnets. (And, of course, a it's possible that different approach is more straightforward than using nets and subnets.)

*This question arose when dealing with a proof of the fact that sum of two compact operators between Banach spaces is a compact operator. (There was a short discussion of this result in functional analysis chatroom quite recently.) Since here we are asking whether for the unit ball $B$ we have that $\overline{T(B)}$ is compact. So if $T=F+G$, it seems quite natural to look at $\overline{T(B)}=\overline{F(B)+G(B)}$, which means that having a result like this might be useful to get an alternative proof.


TL;DR: Do we have $\overline{A+B}=\overline A+\overline B$ if both $\overline A$, $\overline B$ are compact (or if at least one of them is compact). 
1For example, see: Example where closure of $A+B$ is different from sum of closures of $A$ and $B$
 A: Let's work in an abelian Hausdorff topological group $G$. Since $A+B\subseteq\overline{A}+\overline{B}$, as soon as the latter is closed we have $\overline{A+B}\subseteq\overline{A}+\overline{B}$.
This is true when $\overline{A}$ and $\overline{B}$ are compact, because the sum $G\times G\to G$ is continuous.
Now, suppose $a\in\overline{A}$ and $b\in\overline{B}$. Then there exist nets $(a_\delta)$ in $A$ and $(b_\delta)$ in $B$ converging respectively to $a$ and $b$. Note that in topological groups convergence can be stated with nets indexed by a single directed set (for instance, the neighborhood of $0$ ordered by reverse inclusion).
Since the net $(a_\delta+b_\delta)$ is in $A+B$, we get that its limit $a+b$ belongs to $\overline{A+B}$.
(Actually this proves that $\overline{A}+\overline{B}\subseteq\overline{A+B}$ for all $A$ and $B$.)
A: Without any net arguments, just Tychnov and Hausdorff (as an alternative to egregs post):
Assume $\overline{A}$ and $\overline{B}$ are compact. Then $\overline{A} \times \overline{B}$ is compact by Tychonov too. In a Hausdorff-space, they are closed too. Assume there is something like a topological structure that makes $+$ a continuous operator, like in a topological vector space.
Then use the continuouity of $+$ with $\overline{A} \times \overline{B}$, and we see that $\overline{A} + \overline{B}$ is compact too as an image of compact sets under a continuous map and closed in a Hausdorff space.
Also, we have that $+(A,B) \subseteq +(\overline{A}, \overline{B}) \subseteq \overline{+(A,B)} = \overline{A+B}$ (definition of continuity: $f(\overline{X}) \subseteq \overline{f(X)}$). Take the closure now (and its definition as the smallest closed set) and use that the part in the middle is already closed as a compact set, which yields:
$$\overline{A+B} = \overline{A}+\overline{B}. $$
