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

fixing some more edge cases with leading comments affecting breaking #232

Merged
merged 2 commits into from
May 27, 2021

Conversation

belav
Copy link
Owner

@belav belav commented May 24, 2021

closes #217

@@ -25,4 +25,18 @@ class ClassName
"ifThisIsReallyLongItShouldntInsertAnExtraLineAboveItttttttttttttttt"
}
};

private SomeClass[,] someClass = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this valid synatx? what does it even do? 🤔

Copy link
Owner Author

Choose a reason for hiding this comment

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

It's a 2 dimensional array of SomeClass without the size specified. It doesn't really need to be SomeClass after thinking about it. I ran into it in the runtime or roslyn repo and wasn't really sure what it did at first either.

}
if (
line.Type == LineDoc.LineType.Hard
&& currentDoc
Copy link
Collaborator

Choose a reason for hiding this comment

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

wouldn't it make more sense to do an else if here, instead of having the inverse condition as an &&?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes, yes it would!

@belav belav merged commit 6a76b3b into master May 27, 2021
@belav belav deleted the leading-comments-initializer branch May 27, 2021 00:56
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.

Leading comments interfering with breaking InitializerExpression
2 participants