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

feat(typescript): disallow newline after modifiers in generic parameter #1121

Conversation

arieldon
Copy link
Contributor

This closes #1118 -- it reports an error for newlines after 'in'/'out'/'const' modifier in generic parameter.

Report error for newline(s) after 'in'/'out'/'const' modifier in generic
parameter.
Copy link
Collaborator

@strager strager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment on lines +1686 to +1690
if (this->lexer_.peek().has_leading_newline) {
this->diag_reporter_->report(
Diag_Newline_Not_Allowed_After_In_Out_Const_Modifiers{
.modifier = modifiers.back().identifier.span()});
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@strager
Copy link
Collaborator

strager commented Dec 22, 2023

Landed as commit 1ee2154. Thanks!

@strager strager closed this Dec 22, 2023
@arieldon arieldon deleted the disallow-newline-after-in-out-const branch December 23, 2023 01:19
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.

10$: disallow newline after 'in'/'out'/'const' modifier in generic parameter list
2 participants