From be2eadf8895a0884d758901af46ca416966e03c8 Mon Sep 17 00:00:00 2001 From: cqh963852 Date: Sat, 24 Oct 2026 00:04:03 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(checker):=20=E6=8E=A8=E6=96=AD?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E5=BC=95=E6=93=8E=E8=A1=A5=20Go=20instantiat?= =?UTF-8?q?eTypeWithAlias=20=E5=85=A5=E5=8F=A3=E9=97=B8=E2=80=94=E2=80=94?= =?UTF-8?q?=E9=80=92=E5=BD=92=E5=9E=8B=E5=88=AB=E5=90=8D=E4=BD=93=E6=B7=B1?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E4=BA=A7=20alias=3DNone=20=E8=87=AA=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E5=A3=B3=E7=9A=84=E6=97=A0=E7=95=8C=E5=A2=9E=E6=AE=96?= =?UTF-8?q?=EF=BC=88compiler/typeArgumentInferenceWithRecursivelyReference?= =?UTF-8?q?dTypeAliasToTypeLiteral01/02=20worker=20signal=206=EF=BC=89"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 37403e34a9d3173f25f128713ae7e8aed258a330. --- .../src/checker/relater_probing_checker_4.rs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/crates/tsox-checker/src/checker/relater_probing_checker_4.rs b/crates/tsox-checker/src/checker/relater_probing_checker_4.rs index ab6ca3f..ff1793d 100644 --- a/crates/tsox-checker/src/checker/relater_probing_checker_4.rs +++ b/crates/tsox-checker/src/checker/relater_probing_checker_4.rs @@ -41,24 +41,6 @@ impl Checker { if params.is_empty() || substitutions.is_empty() { return Arc::clone(t); } - // Go instantiateTypeWithAlias 入口闸(checker.go:22604-22608): - // couldContainTypeVariables 假且 alias 实参无可含变量时原样返回 t。 - // isNonGenericTopLevelType(checker.go:22727-22741)使顶层无实参别名 - // 体型恒假(type TreeNode = { parent: TreeNode }),别名体永不进代入。 - // 缺闸时递归别名体落 substitute_object_properties_deep 的 in-progress - // 自引用壳(alias=None、新 id),changed 虚真每轮产新对象,以 id 为键 - // 的环闸全 miss 致无界增殖(typeArgumentInferenceWithRecursively - // ReferencedTypeAliasToTypeLiteral01 signal 6);m1h_2.rs:132 同款闸 - let alias_has_type_variables = t.alias.as_ref().is_some_and(|a| { - !a.type_arguments.is_empty() - && a - .type_arguments - .iter() - .any(|ta| self.could_contain_type_variables(ta)) - }); - if !self.could_contain_type_variables(t) && !alias_has_type_variables { - return Arc::clone(t); - } let t_ptr = Arc::as_ptr(t) as usize; // Go instantiateTypeWithAlias 深度护栏(checker.go:23414)同款:Go 全部 // 实例化经 instantiateTypeWithAlias 计数(depth==100 || count>=5M 报