-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
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
ability to iterate over a tuple with an inline for loop, when the tuple has runtime fields in it #280
Comments
Shouldn't this be closed because of #208 ? Once that's done, one can iterate over a "var args" struct parameter with Edit: as @daurnimator points out, there is still C varargs to worry about. |
This works: const std = @import("std");
test "aoeu" {
var tuple = .{1, 2};
inline for (tuple) |x| {
std.debug.warn("{}\n", .{x});
}
} however this should work but does not: const std = @import("std");
test "aoeu" {
var runtime_two: i32 = 2;
var tuple = .{1, runtime_two};
inline for (tuple) |x| {
std.debug.warn("{}\n", .{x});
}
} gives
Zig needs to not make |
fixing the snippet to use |
See #77
The text was updated successfully, but these errors were encountered: