Skip to content

fix: differentiate between regular and top-level document comments in error messages - #24990

Open
WillLillis wants to merge 1 commit into
ziglang:masterfrom
WillLillis:top_level_doc_err
Open

WillLillis wants to merge 1 commit into
ziglang:masterfrom
WillLillis:top_level_doc_err

Conversation

@WillLillis

Copy link
Copy Markdown
Contributor

Given:

pub const foo = 5;

//! This is main.
pub fn main() void {}

Before:

1:19: error: expected type expression, found 'a document comment'

After:

1:19: error: expected type expression, found 'a top-level document comment'

Tested locally with stage4/bin/zig build test -Dskip-non-native

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile error for misplaced top-level documentation comment is misleading

1 participant