8000 Handle nil deprecation comments by dajiaohuang · Pull Request #1778 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

Handle nil deprecation comments - #1778

Closed
dajiaohuang wants to merge 2 commits into
dominikh:masterfrom
dajiaohuang:fix/astutil-nil-deprecation
Closed

dajiaohuang wants to merge 2 commits into
dominikh:masterfrom
dajiaohuang:fix/astutil-nil-deprecation

Conversation

@dajiaohuang
Copy link
Copy Markdown

Make Deprecation return an empty string for a missing comment group. Add a nil-input regression test.

@dajiaohuang
Copy link
Copy Markdown
Author

Closing after checking the standard library and rerunning the regression against the unmodified implementation: (*ast.CommentGroup).Text already returns an empty string for a nil receiver. TestDeprecationNil passes without this guard, so this PR fixes no demonstrated defect. The unrelated generic-instantiation fix is tracked separately in #1764.

@dajiaohuang dajiaohuang closed this Oct 2, 2026
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.

1 participant

0