Skip to content

Call graph (zig): a function with a brace type in its signature loses its whole body #6432

Closed

Description

@squid-protocol

Found by #3799. In zig, error{..}!T, struct{..} and union(enum){..} in a signature: the type brace is taken as the body start, so the body calls land on the previous function (zig engine-attributes-to-another-function, 959 calls; part of FnCallArguments, 580). Fix: skip balanced braces in the return type before the body {. Class: same check for the other brace-bearing languages (swift, go).

Activity

  1. squid-protocol commented on Oct 24, 2026

    @squid-protocol
    OwnerAuthor

    Claimed by promoter-bot host melek, lease renewed 2026-10-24T11:50Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:melek label.

  2. squid-protocol commented on Oct 24, 2026

    @squid-protocol
    OwnerAuthor

    Fixed by #6440: zig type braces (error/struct/union/enum/opaque) and swift closure defaults no longer end the unit at the signature; go was already handled. Remaining sibling (rust const-generic braces in a signature) needs an angle-depth walk and no burned estate needs it, so it is not tracked here.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions