Sema: fix wording in error message #21944
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think omitting the .zig file extension here is bad for several reasons,but one is that if you have a directory with two empty files called "x.zig" and
"x.zig.zig" and then compile x.zig.zig, it says this:
It talks about x.zig in the message, but then x.zig.zig in the note below.That, even though it never talks about the actual x.zig which is in the same
directory. This is confusing.
This is just the file name and I considered making this the full path to the filebut I think for this the testing infrastructure for compile errors has to be
improved because if it's the full path it might contain random temporary files in the
error message which is untestable. Might not be a problem though.
The other reason is that the full path would already be shown in the "struct declared here"
note which should follow below.