#Is there a way to differentiate type aliases at comptime?
1 messages · Page 1 of 1 (latest)
ah, unfortunately that was just an example, Id like to alias structs
I think const U = @Type(@typeInfo(T)) would create a distinct type
no decls though ofc
hmm yes it does. i think i can workaround that. thanks.
you can discard the decls
const U = comptime blk: {
var ti = @typeInfo(T);
ti.decls = &.{};
break :blk @Type(ti);
};
just so it's guaranteed to alias any type