I'm trying to find a counter-example to the converse of the Cauchy triangle theorem in complex analysis:
Let $D \subset \mathbb{C}$ be a domain. If $f:D \to \mathbb{C}$ continuous such that $\int_{\Gamma}fdz=0$ $\forall$ triangles $\Gamma \subset D$, then $f$ has an anti-derivative.
I know that this statement is true if $D$ is a star domain, but I'm not sure what a counter example might be if $D$ is an arbitrary domain. Any help would be greatly appreciated.