-
-
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
cannot compile with multiline strings #14513
Comments
Can't reproduce this.
where EDIT: It's possible that Windows line endings (CRLF) are causing this. If I convert the file to use CRLF line endings, I get a similar compile error:
Make sure you are using unix-style (LF) line endings. I'm unsure of the status of line-ending stuff, though, so I'm not sure if this is a bad/misleading error message or a bug. EDIT#2: Was able to get an exact reproduction with hard tabs before the second const std = @import("std");
pub fn main() void {
std.debug.print(
\\Hello World
<\t><\t>\\
,
.{}
);
} where The error message here should definitely be improved, though; additionally, I hit an unreachable when trying to run
|
Duplicate of #11414 |
Zig Version
0.11.0-dev.1507+6f13a725a
Steps to Reproduce and Observed Behavior
Compile the following source file
which will result in an error about a poorly terminated symbol instead of a multi line string.
Expected Behavior
The lines beginning with doubled backslashes should have been read as multiline strings, as per 5.3.2. Multiline String Literals
The text was updated successfully, but these errors were encountered: