Files
Martin Vogel c6ccdd9395 fix(dart): index extension declarations and their members (#1457)
The Dart language spec listed class_definition, enum_declaration,
mixin_declaration and type_alias as container kinds, but not
extension_declaration. The def walk never treated `extension X on Y { }`
as a container, and extract_func_def could not name the bare
`method_signature` wrappers in the extension body. So the extension and
every member were dropped: only the Module, File, the extended class and
top-level functions made it into the graph.

- lang_specs.c: add extension_declaration to dart_class_types. A named
  extension becomes a Class node, and its members become Methods with
  DEFINES_METHOD edges from it. In-body calls get the method as caller.
- extract_defs.c: an unnamed `extension on T { }` has no name to attach
  its members to. extract_class_def would return before
  extract_class_methods and drop them. Walk such an extension's members
  as file-level Functions instead, unwrapping method_signature to its
  named function_signature.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-09-25 18:37:16 +02:00
..