Skip to content

stage2: @typeName of errors and error unions is less useful #12553

@leecannon

Description

@leecannon

Zig Version

0.10.0-dev.3660+4a98385b0

Steps to Reproduce

const std = @import("std");

pub fn main() void {
    std.debug.print("{s}\n", .{@typeName(Thing)});
    std.debug.print("{s}\n", .{@typeName(Error)});
}

const Error = error{ a, b };
const Thing = Error!usize;

Expected Behavior

Behaviour with stage 1:

$ zig build run -fstage1
Error!usize
Error

Actual Behavior

Behaviour with self-hosted:

$ zig build run
error{a,b}!usize
error{a,b}

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendTokenization, parsing, AstGen, Sema, and Liveness.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions