From 0b6c028fd4be048bde9369b870e6fe4b80577886 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sun, 20 Feb 2022 12:55:32 +0100 Subject: publish --- puzzles/tricky_enum.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 puzzles/tricky_enum.py (limited to 'puzzles/tricky_enum.py') diff --git a/puzzles/tricky_enum.py b/puzzles/tricky_enum.py new file mode 100644 index 0000000..a743168 --- /dev/null +++ b/puzzles/tricky_enum.py @@ -0,0 +1,8 @@ +import enum +from typing import Literal + +class Color(enum.Enum): + Red = enum.auto() + Blue = enum.auto() + +c: Literal[Color.Red] = Color.Blue # error -- cgit v1.2.3