Skip to content
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

The error message for TAB in comments is very unclear and misleading #22160

Closed
zigo101 opened this issue Dec 5, 2024 · 2 comments · Fixed by #21459
Closed

The error message for TAB in comments is very unclear and misleading #22160

zigo101 opened this issue Dec 5, 2024 · 2 comments · Fixed by #21459
Labels
error message This issue points out an error message that is unhelpful and should be improved.
Milestone

Comments

@zigo101
Copy link

zigo101 commented Dec 5, 2024

Zig Version

0.14.0-dev.2178+bd7dda0c5

Steps to Reproduce and Observed Output

pub fn main() !void {
}

//fn foo() usize{
//	return 0; // TAB is before the return
//}
main.zig:2:2: error: expected type expression, found 'invalid token'
}
 ^

Expected Output

z.zig:5:3: error: comments can not contain TAB chars
//	return 0; // TAB is before the return
  ^
@zigo101 zigo101 added the error message This issue points out an error message that is unhelpful and should be improved. label Dec 5, 2024
@andrewrk andrewrk added this to the unplanned milestone Dec 6, 2024
@rohlem
Copy link
Contributor

rohlem commented Dec 6, 2024

seems like a duplicate of #20900

@tsokano
Copy link

tsokano commented Dec 8, 2024

I too have wasted a lot of time because I did not find this out.
Please improve the error message.

And I'd like to see a note here.
https://ziglang.org/documentation/master/#toc-Multiline-String-Literals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error message This issue points out an error message that is unhelpful and should be improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants