fix(sema): bind imported calls to full declaration path for sound transitive proof invalidation

This commit is contained in:
cflmy committed 2026-11-18 12:36:36 +08:00
1 parent da0fc6a188
commit 77989362ca
1 file changed
+7 -3
+7 -3
View File
@@ -913,10 +913,14 @@ fn classify_call(
}) else {
return CallClass::Other;
};
let decl = if path.len() >= 2 {
path[1..].to_vec()
} else if let Some(d) = declaration_path_of(lib, fun) {
// Resolve the *declaration* path in the imported module, not
// the syntactic call path: `rates.lookup()` may refer to a
// nested `# rates / ## lookup` function. Losing the parent
// would silently break transitive proof invalidation.
let decl = if let Some(d) = declaration_path_of(lib, fun) {
d
} else if path.len() >= 2 {
path[1..].to_vec()
} else {
return CallClass::Other;
};