@@ -2406,14 +2406,18 @@ static void resolve_file_usages(resolve_ctx_t *rc, resolve_worker_state_t *ws,
24062406
24072407/* Resolve throws/raises for one file. */
24082408static void resolve_file_throws (resolve_ctx_t * rc , resolve_worker_state_t * ws ,
2409- CBMFileResult * result , const char * module_qn , const char * * imp_keys ,
2410- const char * * imp_vals , int imp_count ) {
2409+ CBMFileResult * result , const char * rel , const char * module_qn ,
2410+ const char * * imp_keys , const char * * imp_vals , int imp_count ) {
24112411 for (int t = 0 ; t < result -> throws .count ; t ++ ) {
24122412 CBMThrow * thr = & result -> throws .items [t ];
24132413 if (!thr -> exception_name || !thr -> enclosing_func_qn ) {
24142414 continue ;
24152415 }
2416- const cbm_gbuf_node_t * src = cbm_gbuf_find_by_qn (rc -> main_gbuf , thr -> enclosing_func_qn );
2416+ /* find_source_node falls back to the per-file File node when the
2417+ * lookup lands on a shared Folder/Project node (#787, #842) — same
2418+ * guard resolve_file_calls/usages/rw already use. */
2419+ const cbm_gbuf_node_t * src =
2420+ find_source_node (rc -> main_gbuf , rc -> project_name , rel , thr -> enclosing_func_qn );
24172421 if (!src ) {
24182422 continue ;
24192423 }
@@ -2822,7 +2826,7 @@ static void resolve_worker(int worker_id, void *ctx_ptr) {
28222826
28232827 /* ── THROWS / RAISES ───────────────────────────────────── */
28242828 _ph_t0 = extract_now_ns ();
2825- resolve_file_throws (rc , ws , result , module_qn , imp_keys , imp_vals , imp_count );
2829+ resolve_file_throws (rc , ws , result , rel , module_qn , imp_keys , imp_vals , imp_count );
28262830 atomic_fetch_add_explicit (& rc -> time_ns_throws , extract_now_ns () - _ph_t0 ,
28272831 memory_order_relaxed );
28282832
0 commit comments