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

Auto-indentation on colon for switches with patterns #9443

Merged
merged 1 commit into from
Mar 3, 2016

Conversation

gafter
Copy link
Member

@gafter gafter commented Mar 3, 2016

Fixes #9097

@CyrusNajmabadi @dotnet/roslyn-ide please review.

@gafter gafter self-assigned this Mar 3, 2016
@gafter gafter added this to the 2.0 (Preview) milestone Mar 3, 2016
@gafter gafter added the 4 - In Review A fix for the issue is submitted for review. label Mar 3, 2016
@DustinCampbell
Copy link
Member

👍

gafter added a commit that referenced this pull request Mar 3, 2016
Auto-indentation on colon for switches with patterns
@gafter gafter merged commit d4e0d61 into dotnet:features/patterns Mar 3, 2016
@jaredpar
Copy link
Member

jaredpar commented Mar 3, 2016

👍

@@ -151,7 +151,7 @@ private static bool TokenShouldNotFormatOnReturn(SyntaxToken token)
private static bool TokenShouldNotFormatOnTypeChar(SyntaxToken token)
{
return (token.IsKind(SyntaxKind.CloseParenToken) && !token.Parent.IsKind(SyntaxKind.UsingStatement)) ||
(token.IsKind(SyntaxKind.ColonToken) && !(token.Parent.IsKind(SyntaxKind.LabeledStatement) || token.Parent.IsKind(SyntaxKind.CaseSwitchLabel) || token.Parent.IsKind(SyntaxKind.DefaultSwitchLabel)));
(token.IsKind(SyntaxKind.ColonToken) && !(token.Parent.IsKind(SyntaxKind.LabeledStatement) || token.Parent is SwitchLabelSyntax));
Copy link
Member

Choose a reason for hiding this comment

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

Doh, should have caught that when I fixed the other switch issues 😦

@gafter gafter deleted the patterns-9097 branch May 24, 2018 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - In Review A fix for the issue is submitted for review. Area-IDE cla-already-signed New Language Feature - Pattern Matching Pattern Matching
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants