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.11.0
This code should print the line correctly and it fails to compile:
const std = @import("std"); pub fn main() void { const line_text = comptime std.fmt.comptimePrint("{}", .{@src().line}); std.debug.print(line_text, .{}); }
example.zig:4:61: error: unable to evaluate comptime expression example.zig:4:61: note: operation is runtime due to this operand
This doesn't compile in 0.10 without -fstage1 and in 0.11. This compiles correctly in 0.9 and in 0.10 with -fstage1.
Compile and print correctly the line number at runtime.
The text was updated successfully, but these errors were encountered:
This is working as intended: #2029 (comment)
Sorry, something went wrong.
No branches or pull requests
Zig Version
0.11.0
Steps to Reproduce and Observed Behavior
This code should print the line correctly and it fails to compile:
This doesn't compile in 0.10 without -fstage1 and in 0.11.
This compiles correctly in 0.9 and in 0.10 with -fstage1.
Expected Behavior
Compile and print correctly the line number at runtime.
The text was updated successfully, but these errors were encountered: