bpo-43892: Validate the first term of complex literal value patterns (GH-25735)
diff --git a/Lib/test/test_patma.py b/Lib/test/test_patma.py
index f327552..1f80fb4 100644
--- a/Lib/test/test_patma.py
+++ b/Lib/test/test_patma.py
@@ -2873,6 +2873,38 @@ def test_patma_284(self):
pass
""")
+ @no_perf
+ def test_patma_285(self):
+ self.assert_syntax_error("""
+ match ...:
+ case 0j+0:
+ pass
+ """)
+
+ @no_perf
+ def test_patma_286(self):
+ self.assert_syntax_error("""
+ match ...:
+ case 0j+0j:
+ pass
+ """)
+
+ @no_perf
+ def test_patma_287(self):
+ self.assert_syntax_error("""
+ match ...:
+ case {0j+0: _}:
+ pass
+ """)
+
+ @no_perf
+ def test_patma_288(self):
+ self.assert_syntax_error("""
+ match ...:
+ case {0j+0j: _}:
+ pass
+ """)
+
class PerfPatma(TestPatma):