Repository: sympy/sympy

Issue:
contains called on union of ComplexRegions in polar form is incorrect
Calling contains on unions of ComplexRegions in polar form returns incorrect values
```python
In [3]: A, B, C, D = Interval(0,1), Interval(0, pi), Interval(2,3), Interval(pi, Rational(3,2) * pi)

In [4]: C1 = ComplexRegion(A*B, polar=True)

In [5]: C2 = ComplexRegion(C*D, polar=True)

In [6]: -3 in C2
Out[6]: True

In [7]: -3 in C2.union(C1)
Out[7]: False

In [8]: -3 in C1.union(C2)
Out[8]: False

In [9]: C1.union(C2).contains(-3)
Out[9]: False

In [10]: C2.union(C1).contains(-3)
Out[10]: False
```
Last four tests should return `True`
Interestingly, this is working properly for non-polar ComplexRegion
```python
In [11]: A, B = Interval(0,1), Interval(-4,-3)

In [12]: C1 = ComplexRegion(A * A)

In [13]: C2 = ComplexRegion(B * A)

In [14]: -4 in C2
Out[14]: True

In [15]: -4 in C2.union(C1)
Out[15]: True

In [16]: -4 in C1.union(C2)
Out[16]: True

In [17]: C2.union(C1).contains(-4)
Out[17]: True

In [18]: C1.union(C2).contains(-4)
Out[18]: True
```

Discussion:

Patch:
diff --git a/sympy/sets/fancysets.py b/sympy/sets/fancysets.py
index 959cfce626..21f38ce454 100644
--- a/sympy/sets/fancysets.py
+++ b/sympy/sets/fancysets.py
@@ -1409,7 +1409,7 @@ def _contains(self, other):
                 if And(element.args[0]._contains(r),
                         element.args[1]._contains(theta)):
                     return True
-                return False
+            return False
 
     def _intersect(self, other):
 


Test patch:
diff --git a/sympy/sets/tests/test_fancysets.py b/sympy/sets/tests/test_fancysets.py
index 2ab0542dd0..ce6bee3e67 100644
--- a/sympy/sets/tests/test_fancysets.py
+++ b/sympy/sets/tests/test_fancysets.py
@@ -728,3 +728,13 @@ def test_issue_11938():
     assert Intersection(cp1, S.Reals) == Interval(-1, 1)
     assert Intersection(cp2, S.Reals) == Interval(-1, 0)
     assert Intersection(cp3, S.Reals) == FiniteSet(0)
+
+def test_issue_11914():
+    a, b = Interval(0, 1), Interval(0, pi)
+    c, d = Interval(2, 3), Interval(pi, 3 * pi / 2)
+    cp1 = ComplexRegion(a * b, polar=True)
+    cp2 = ComplexRegion(c * d, polar=True)
+
+    assert -3 in cp1.union(cp2)
+    assert -3 in cp2.union(cp1)
+    assert -5 not in cp1.union(cp2)