From dd95bf5bd4be407a3b10fc3f90930529bfefb68e Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Mon, 17 Aug 2026 21:25:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(handles):=20=5Ftry=5Foperator=5FoverLoad=20?= =?UTF-8?q?fallback=20=E8=A1=A5=E5=9B=9E=20SpecClass=20=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E4=BF=AE=20UnboundLocalError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/Handles/HandlesExprUtils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/core/Handles/HandlesExprUtils.py b/lib/core/Handles/HandlesExprUtils.py index 6f9da6c..6d6b42c 100644 --- a/lib/core/Handles/HandlesExprUtils.py +++ b/lib/core/Handles/HandlesExprUtils.py @@ -89,6 +89,7 @@ class ExprUtils: # var_struct_class 仅记录裸模板名,但方法只在特化版本中定义。 # 选择策略:优先选 obj_val.type.pointee 实际匹配的特化;否则选第一个有方法的特化。 if '[' not in ClassName: + SpecClass: str | None = None # 先收集所有候选特化(有方法 declare 或 define 的) best_candidates: list[str] = [] for CN in Gen.structs.keys():