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

Break after type constraints for method declarations. It keeps things more consistent #365

Merged
merged 2 commits into from
Jul 24, 2021

Conversation

belav
Copy link
Owner

@belav belav commented Jul 19, 2021

closes #299

Copy link
Collaborator

@shocklateboy92 shocklateboy92 left a comment

Choose a reason for hiding this comment

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

Code looks good, but I think the test coverage may have regressed a little.


public static ReturnType<T> MethodName<T, U>(
string reallyLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongParameterIMeanIt
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like you no longer have any tests for the "method with type constraints but no body" case.

@@ -33,4 +51,7 @@ class ClassName<N, C, T, TT, L>
where C : class
where T : IComparable
where TT : IList<N>
where L : class, new() { }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here. You could just duplicate this, so we still have a "class with type constraints but no body" test, which could be different than the interface or struct case.

@belav belav force-pushed the method-generic-breaking branch from c388b40 to 5a97db7 Compare July 23, 2021 01:24
@belav belav merged commit dfc0d2a into master Jul 24, 2021
@belav belav deleted the method-generic-breaking branch July 24, 2021 14:08
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.

MethodDeclaration with Constraints not breaking before brace
2 participants