Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn require(comptime TRAIT: var) void {
- const fn_names_to_check = @typeInfo(TRAIT).Struct;
- }
- const default = struct {
- fn testing() Wrapper() { return Wrapper; }
- };
- fn Wrapper() type {
- comptime { require(default); }
- return struct {};
- }
- pub fn main() void {
- var crash = default.testing();
- }
Advertisement
Add Comment
Please, Sign In to add comment