We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.14.0-dev.1342+1a178d499
Maybe its not a bug and anonymous struct is not allowed to use.
const std = @import("std"); pub fn compare(_: void, lhs: struct {u64}, rhs: struct{u64}) bool { return lhs[0] < rhs[0]; } test "dfd" { var d = std.ArrayList(struct{u64}).init(std.testing.allocator); defer d.deinit(); try d.appendSlice(&.{ .{5}, .{1}, .{3}}); std.sort.block(struct{u64}, d.items, {}, compare); }
returning just failure with status 139 (without any error info) but if we remove anonymous decl, and add type everything works:
const std = @import("std"); pub fn compare(_: void, lhs: tt, rhs: tt) bool { return lhs[0] < rhs[0]; } const tt = struct {u64}; test "dfd" { var d = std.ArrayList(tt).init(std.testing.allocator); defer d.deinit(); try d.appendSlice(&.{ .{5}, .{1}, .{3}}); std.sort.block(tt, d.items, {}, compare); }
Working behavior
The text was updated successfully, but these errors were encountered:
duplicate of #20759
Sorry, something went wrong.
No branches or pull requests
Zig Version
0.14.0-dev.1342+1a178d499
Steps to Reproduce and Observed Behavior
Maybe its not a bug and anonymous struct is not allowed to use.
returning just failure with status 139 (without any error info)
but if we remove anonymous decl, and add type everything works:
Expected Behavior
Working behavior
The text was updated successfully, but these errors were encountered: