diff --git a/App/lib/core/Gen/StructGenMixin.vp b/App/lib/core/Gen/StructGenMixin.vp index 74225d1..1dec661 100644 --- a/App/lib/core/Gen/StructGenMixin.vp +++ b/App/lib/core/Gen/StructGenMixin.vp @@ -730,6 +730,13 @@ novirtual class StructGenMixin: if nm.id is not None and self._NllInSet(al, nm.id) != 0: return 1 return 0 if k == ast.ASTKind.Constant: return 0 + # 属性访问:变量只可能出现在基对象里(`.attr` 是静态字符串),必须显式只递归 .value。 + # 否则若该节点的 children 不含 value,就会落进下面的"拿不到子树 = 算提及"分支 → + # 把 `stdio.printf(...)` 之类误判成提及/不安全,整条 NLL 判据被否掉(现场:该误判 + # 使 `h = new heap S()` 永不降级,g(l, h) 照旧报逃逸)。 + if k == ast.ASTKind.Attribute: + at: ast.Attribute* = ast.Attribute*(node) + return self._NllMentions(at.value, al) ch: list[ast.AST*]* = node.children if ch is None: return 1 n: sizet = len(ch)