diff --git a/graphify/extractors/engine.py b/graphify/extractors/engine.py index d67df62ff..10671a9e8 100644 --- a/graphify/extractors/engine.py +++ b/graphify/extractors/engine.py @@ -5896,6 +5896,23 @@ def _extract_generic( segments = _kotlin_nav_identifier_segments(first, source) if segments is not None and len(segments) >= 3: kotlin_qualified_prefix = ".".join(segments[:-1]) + # #1698: the plain `Receiver.method()` shape (exactly + # two segments) is neither a fully qualified name nor + # eligible for member_receiver (same reasoning as + # above). A capitalized receiver here is an object + # singleton or a class/companion member reference — + # statically unambiguous, no type inference needed — + # captured separately so a dedicated cross-file pass + # can resolve it by declared-type name when the in + # file bare name lookup below finds nothing (the + # cross-file case this issue is about; the same-file + # case already resolves through that lookup and never + # reaches raw_calls at all). + elif ( + segments is not None and len(segments) == 2 + and segments[0][:1].isupper() + ): + kotlin_object_receiver = segments[0] elif config.ts_module == "tree_sitter_scala": # Scala: first child first = node.children[0] if node.children else None