Skip to content

Commit 6724c46

Browse files
authored
fix(native): remove spurious else-if in Rust findCaller that misattributed 68 call edges (#637)
The Rust `build_call_edges` had an `else if` branch that assigned calls to the nearest preceding definition even when the call was outside that definition's span. This caused ~68 call edges to be silently dropped (caller == target → self-call filter) instead of correctly falling back to the file node as caller. The JS `findCaller` never had this branch. Closes #613
1 parent 1fae7e1 commit 6724c46

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

crates/codegraph-core/src/edge_builder.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,6 @@ pub fn build_call_edges(
182182
caller_span = span;
183183
}
184184
}
185-
} else if def.line <= call.line && caller_id == file_node_id {
186-
if let Some(id) = def.node_id {
187-
caller_id = id;
188-
}
189185
}
190186
}
191187

0 commit comments

Comments
 (0)