Nested tagged unions

I think you want something more like this:

switch (this.q) { // not tag(this.q)
    inline else => |u, tag|
        return u == @field(other.q, @tagName(tag)),
}

related topic:

1 Like