Revert "fix(checker): 推断替换引擎补 Go instantiateTypeWithAlias 入口闸——递归型别名体深替换产 alias=None 自引用壳的无界增殖(compiler/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01/02 worker signal 6)"
This reverts commit 37403e34a9.
This commit is contained in:
1 parent
c97b63cb77
commit
be2eadf889
1 file changed
-18
@@ -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 报
|
||||
|
||||
Reference in new issue
Block a user