Skip to content

inlay hints for merged error sets show the entire body of the error type #1828

@xdBronch

Description

@xdBronch

Zig Version

0.12.0-dev.3245+4f782d1e8

Zig Language Server Version

0.12.0-dev.490+fd3b5af

Client / Code Editor / Extensions

No response

Steps to Reproduce and Observed Behavior

test {
    const not_merged = @as(error{ a, b, c, d, e, f, g, h }, undefined);
    const merged = @as(error{ a, b, c, d } || error{ e, f, g, h }, undefined);

    _ = not_merged;
    _ = merged;
}

image

the problem becomes much worse with many error types in the stdlib due to doc comments on each error

Expected Behavior

error set should be truncated similar to what was done in #1822

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions