Blob Blame History Raw
From 0d786b43a09243d7655831d0b6c4a94a8d7c7581 Mon Sep 17 00:00:00 2001
From: Anthony Sottile <asottile@umich.edu>
Date: Sat, 17 Jun 2023 09:22:31 -0400
Subject: [PATCH] add test file for new 3.12 syntax

---
 testsuite/python312.py | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/testsuite/python312.py b/testsuite/python312.py
index 2b42833..d2e73bc 100644
--- a/testsuite/python312.py
+++ b/testsuite/python312.py
@@ -7,3 +7,23 @@ def foo():
 
 def bar():
     pass
+#: Okay
+# new type aliases
+type X = int | str
+type Y[T] = list[T]
+type Z[T: str] = list[T]
+#: Okay
+# new generics
+def f[T](x: T) -> T:
+    pass
+
+
+def g[T: str, U: int](x: T, y: U) -> dict[T, U]:
+    pass
+#: Okay
+# new nested f-strings
+f'{
+    thing
+} {f'{other} {thing}'}'
+#: E201:1:4 E202:1:17
+f'{ an_error_now }'
-- 
2.41.0