diff --git a/App/lib/core/Gen/Call/CallGenBase.vp b/App/lib/core/Gen/Call/CallGenBase.vp index b682c53..af486f1 100644 --- a/App/lib/core/Gen/Call/CallGenBase.vp +++ b/App/lib/core/Gen/Call/CallGenBase.vp @@ -898,8 +898,12 @@ novirtual class CallGenBase: # struct 字面量 {T1, T2, ...}(tuple 打包返回类型)必须在 * 检查之前,否则内含 * 会被误判为 i8*(破坏 tuple 解包) if s < e and buf[s] == '{': - th_st: llvmlite.Function* = None - tt_st: llvmlite.Function* = None + # 字段链表节点必须是 llvmlite.ParamNode(new_param_node 返回 rawptr[ParamNode], + # paramnode_set_next / Struct 的形参也都是 rawptr[ParamNode])。原先误注解为 + # Function*(与 ParamNode 是不相关类),严格指针规则下这两处的实参传递会被判 + # 「struct↔struct 隐式转换已禁止」;改注解即根治,不需要也不应该加强转。 + th_st: llvmlite.ParamNode* = None + tt_st: llvmlite.ParamNode* = None tc_st: int = 0 ps_st: sizet = s + 1 while ps_st < e and buf[ps_st] != '}': @@ -914,7 +918,7 @@ novirtual class CallGenBase: if ee_st > es_st: et_st: llvmlite.LLVMType* = self._ParseLLVMRetTyStr(pool, buf, es_st, ee_st) if et_st is None: return None - en_st: llvmlite.Function* = llvmlite.new_param_node(pool, et_st) + en_st: llvmlite.ParamNode* = llvmlite.new_param_node(pool, et_st) if en_st is None: return None if th_st is None: th_st = en_st