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
const std = @import("std"); pub fn foo(args: ...) @typeOf(args[0]) { return args[0]; } test "" { const x = foo(i32(1), i64(2)); }
This should ultimately be fixed by #208.
The text was updated successfully, but these errors were encountered:
It looks like args should be comptime since @typeOf is used on them. Should this be a compile error?
args
@typeOf
Sorry, something went wrong.
What's this I found, a var args bug report? Solved by deleting var args from the language!
const std = @import("std"); pub fn foo(args: var) @TypeOf(args[0]) { return args[0]; } test "" { const x = foo(.{ @as(i32, 1), @as(i64, 2) }); }
[nix-shell:~/dev/zig/build]$ ./zig test test.zig All 1 tests passed.
No branches or pull requests
This should ultimately be fixed by #208.
The text was updated successfully, but these errors were encountered: