summaryrefslogtreecommitdiff
path: root/Lib/test/ann_module6.py
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2021-09-25 11:56:22 +0300
committerGitHub <noreply@github.com>2021-09-25 10:56:22 +0200
commit784905dbeff68cf788bbeefe0a675af1af04affc (patch)
treeea65406abec0964e637a33da355e6edc33a9e94a /Lib/test/ann_module6.py
parent4c0fc65cd8a6d4c18330505576ccd4b46abeec1c (diff)
downloadcpython-git-784905dbeff68cf788bbeefe0a675af1af04affc.tar.gz
bpo-45166: fixes `get_type_hints` failure on `Final` (GH-28279)
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Diffstat (limited to 'Lib/test/ann_module6.py')
-rw-r--r--Lib/test/ann_module6.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/ann_module6.py b/Lib/test/ann_module6.py
new file mode 100644
index 0000000000..679175669b
--- /dev/null
+++ b/Lib/test/ann_module6.py
@@ -0,0 +1,7 @@
+# Tests that top-level ClassVar is not allowed
+
+from __future__ import annotations
+
+from typing import ClassVar
+
+wrong: ClassVar[int] = 1