diff --git a/App/lib/core/Gen/TypeGenBase.vp b/App/lib/core/Gen/TypeGenBase.vp index ea17530..615d7a4 100644 --- a/App/lib/core/Gen/TypeGenBase.vp +++ b/App/lib/core/Gen/TypeGenBase.vp @@ -227,6 +227,7 @@ class TypeGenBase: """ if name is None: return name + rv_d: str = name if self.GenericTpNames is not None and self.GenericTypeArgs is not None: rg_n: t.CSizeT = len(self.GenericTpNames) rg_i: t.CSizeT @@ -235,5 +236,11 @@ class TypeGenBase: if rg_tpn is not None and string.strcmp(name, rg_tpn) == 0: rg_ta: str = self.GenericTypeArgs.get(rg_i) if rg_ta is not None: - return rg_ta - return name \ No newline at end of file + rv_d = rg_ta + break + # 诊断(8fbba list[str].get 返回类型不匹配定位):T 替换结果。 + # list[str] 特化时 T 应替换为 str;若替换为 Value 则泛型上下文 + # GenericTypeArgs 被嵌套特化污染。 + if string.strcmp(name, "T") == 0: + stdio.printf("[DIAG] resolve_generic_type_name: T -> %s\n", rv_d) + return rv_d \ No newline at end of file