From 5cda173a5e9669321de3ba30ec84ae7403984ad7 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Wed, 19 Aug 2026 05:18:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(ast):=20re-export=20attribute=5Fget=5Fattr?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E8=B7=A8=E6=A8=A1=E5=9D=97=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=B1=BB=E5=9E=8B=E8=A7=A3=E6=9E=90=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TPV TypeGenCType/TypeGenResolve 以 ast.attribute_get_attr(at) 调用,但 ast 包 from .exprs import (...) 未 re-export 该函数(定义在 ast.exprs)→ 跨模块 函数返回类型解析在 ast 包 text.ll 找不到定义 → fail-fast "返回类型无法 精确获取"。按既有 re-export 惯例(如 get_parse_err_line)补入导出列表。 --- includes/ast/__init__.vp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/ast/__init__.vp b/includes/ast/__init__.vp index 5f2a60a..b82bdca 100644 --- a/includes/ast/__init__.vp +++ b/includes/ast/__init__.vp @@ -37,6 +37,10 @@ from .exprs import ( Constant, NamedExpr, Attribute, Subscript, Starred, Name, List, Tuple, Slice, Call, Compare, OpNode, + # 属性访问辅助函数(TPV TypeGen 以 ast.attribute_get_attr 调用; + # 未 re-export 时跨模块函数返回类型解析在 ast 包 text.ll 找不到 + # 定义(定义在 ast.exprs)→ fail-fast "返回类型无法精确获取") + attribute_get_attr, ) # Auxiliary Nodes from .astaux import (