Skip to content

test(cpp): assert a union member function becomes a method edge #4070

Description

@safishamsi

Good first issue. Union support landed in #4052, but no test covers a union with a member function.

Where: tests/test_cpp_union_specifier_is_extracted (tests/test_cpp_*.py)
What: add a case with a named union that declares a method, e.g. union U { int i; int get() const; };, and assert get is emitted as a method edge of U (not a field).
Acceptance: new test passes with uv run pytest -k union.

Activity

  1. safishamsi commented on Oct 5, 2026

    @safishamsi
    MemberAuthor

    Resolved by #4114 (thanks @xiehuanyi), shipped in v0.9.77. Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions