Skip to content

Commit afe64e8

Browse files
committed
Fix self check
1 parent ab6eea0 commit afe64e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mypyc/irbuild/function.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ def c() -> None:
247247
builder.enter(fn_info, ret_type=sig.ret_type)
248248

249249
if is_generator:
250-
generator_class_ir = builder.mapper.fdef_to_generator[builder.fn_info.fitem]
250+
fitem = builder.fn_info.fitem
251+
assert isinstance(fitem, FuncDef), fitem
252+
generator_class_ir = builder.mapper.fdef_to_generator[fitem]
251253
builder.fn_info.generator_class = GeneratorClass(generator_class_ir)
252254

253255
# Functions that contain nested functions need an environment class to store variables that

0 commit comments

Comments
 (0)