bpo-41659: Disallow curly brace directly after primary (GH-22996)

diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 1ec4468..4dbf5fe 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -208,6 +208,7 @@ def testSyntaxErrorOffset(self):
         check(b'Python = "\xcf\xb3\xf2\xee\xed" +', 1, 18)
         check('x = "a', 1, 7)
         check('lambda x: x = 2', 1, 1)
+        check('f{a + b + c}', 1, 2)
 
         # Errors thrown by compile.c
         check('class foo:return 1', 1, 11)
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index 7c3302c..c25b852 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -802,6 +802,9 @@ def _check_error(self, code, errtext,
         else:
             self.fail("compile() did not raise SyntaxError")
 
+    def test_curly_brace_after_primary_raises_immediately(self):
+        self._check_error("f{", "invalid syntax", mode="single")
+
     def test_assign_call(self):
         self._check_error("f() = 1", "assign")