修正了种子编译器的错误
This commit is contained in:
@@ -163,6 +163,11 @@ class AssignHandle(BaseHandle):
|
||||
if type_info.get('type') == 'CArray':
|
||||
var_type_for_list = type_info.get('full_type')
|
||||
Value: ir.Value | None = self.HandleExprLlvm(Node.value, VarType=var_type_for_list)
|
||||
# 闭包变量追踪:当赋值右侧是返回闭包的函数调用时,记录变量为闭包类型
|
||||
if isinstance(Node.value, ast.Call) and isinstance(Node.value.func, ast.Name):
|
||||
CalledName: str = Node.value.func.id
|
||||
if CalledName in Gen._closure_return_types:
|
||||
Gen._closure_var_types[VarName] = Gen._closure_return_types[CalledName]
|
||||
if not Value:
|
||||
return
|
||||
if isinstance(Value.type, ir.VoidType):
|
||||
|
||||
Reference in New Issue
Block a user