zls icon indicating copy to clipboard operation
zls copied to clipboard

Represent error sets through InternPool

Open FnControlOption opened this issue 10 months ago • 0 comments

Preparatory work for peer type resolution with error unions

Regression 1: link to error set is no longer included in "Go to ..." when hovering.

Regression 2: given error set E = error{A,B} and struct S, E!S is printed as error{A,B}!S. However, this is consistent with how Zig would normally print E!S in e.g. std.debug.print.

const std = @import("std");
const E = error{A,B};
const S = struct{};
pub fn main() !void {
    std.debug.print("{}", .{E!S}); // => error{A,B}!S
}

FnControlOption avatar Feb 23 '25 20:02 FnControlOption