We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a047036 commit 8d45132Copy full SHA for 8d45132
1 file changed
mypyc/irbuild/for_helpers.py
@@ -8,7 +8,7 @@
8
from __future__ import annotations
9
10
from collections.abc import Callable
11
-from typing import ClassVar
+from typing import ClassVar, cast
12
13
from mypy.nodes import (
14
ARG_POS,
@@ -255,8 +255,9 @@ def sequence_from_generator_preallocate_helper(
255
256
proper_types = get_proper_types(proper_type.items)
257
258
+ get_item_ops: list[LoadLiteral | TupleGet]
259
if all(isinstance(typ, LiteralType) for typ in proper_types):
- get_item_ops = [LoadLiteral(typ.value, object_rprimitive) for typ in proper_types]
260
+ get_item_ops = [LoadLiteral(cast(LiteralType, typ.value), object_rprimitive) for typ in proper_types]
261
262
else:
263
sequence = builder.accept(sequence_expr)
0 commit comments