(&mut self)
| 1435 | } |
| 1436 | |
| 1437 | fn flush_fn_ref_candidates(&mut self) { |
| 1438 | let cands = std::mem::take(&mut self.fn_ref_cands); |
| 1439 | if cands.is_empty() || util::is_generated_file(self.file_path) { |
| 1440 | return; |
| 1441 | } |
| 1442 | let mut seen: HashSet<(String, String)> = HashSet::new(); |
| 1443 | for c in cands { |
| 1444 | // C# candidates are always bare names (its this-forms normalize to |
| 1445 | // the bare member), so the `this.`/`::` bypasses are inert — kept |
| 1446 | // for shared-shape parity. Gate: definedHere ∪ importedNames. |
| 1447 | if !c.name.starts_with("this.") |
| 1448 | && !c.name.contains("::") |
| 1449 | && !self.defined_fn_names.contains(&c.name) |
| 1450 | && !self.imported_names.contains(&c.name) |
| 1451 | { |
| 1452 | continue; |
| 1453 | } |
| 1454 | if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) { |
| 1455 | continue; |
| 1456 | } |
| 1457 | let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte); |
| 1458 | let name_ref = self.arena.put(&c.name); |
| 1459 | self.tables.push_ref(&RefRow { |
| 1460 | from_idx: c.from, |
| 1461 | kind: FUNCTION_REF_CODE, |
| 1462 | line: c.line, |
| 1463 | column, |
| 1464 | reference_name: name_ref, |
| 1465 | candidates: NONE_STR, |
| 1466 | from_id_str: NONE_STR, |
| 1467 | }); |
| 1468 | } |
| 1469 | } |
| 1470 | |
| 1471 | // --- value references -------------------------------------------------------- |
| 1472 |
no test coverage detected