Skip to content

Commit 325a751

Browse files
Update ll_builder.py
1 parent 8c6be05 commit 325a751

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

mypyc/irbuild/ll_builder.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import sys
1010
from collections.abc import Sequence
11-
from typing import Callable, Final, Optional
11+
from typing import Any, Callable, Final, Optional
1212

1313
from mypy.argmap import map_actuals_to_formals
1414
from mypy.nodes import ARG_POS, ARG_STAR, ARG_STAR2, ArgKind
@@ -121,6 +121,7 @@
121121
pointer_rprimitive,
122122
short_int_rprimitive,
123123
str_rprimitive,
124+
tuple_rprimitive,
124125
)
125126
from mypyc.irbuild.util import concrete_arg_kind
126127
from mypyc.options import CompilerOptions
@@ -1281,6 +1282,12 @@ def load_complex(self, value: complex) -> Value:
12811282
"""Load a complex literal value."""
12821283
return self.add(LoadLiteral(value, object_rprimitive))
12831284

1285+
def load_tuple(self, value: tuple[Any, ...]) -> Value: # should this be RTuple? conditional RTuple when length is known?
1286+
return self.add(LoadLiteral(value, tuple_rprimitive))
1287+
1288+
def load_dict(self, value: dict[Any, Any]) -> Value:
1289+
return self.add(LoadLiteral(value, dict_rprimitive))
1290+
12841291
def load_static_checked(
12851292
self,
12861293
typ: RType,

0 commit comments

Comments
 (0)