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

Support record structs in complete statement command #52697

Merged
merged 3 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ private static bool TryGetCaretPositionToMove(SyntaxNode statementNode, Snapshot
case SyntaxKind.ArrowExpressionClause:
case SyntaxKind.MethodDeclaration:
case SyntaxKind.RecordDeclaration:
case SyntaxKind.RecordStructDeclaration:
// These statement types end in a semicolon.
// if the original caret was inside any delimiters, `caret` will be after the outermost delimiter
targetPosition = caret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ internal static int MethodM(int a, int b)
[InlineData("public record C(int X, $$int Y)", "public record C(int X, int Y)")]
[InlineData("public record C(int X, int$$ Y)", "public record C(int X, int Y)")]
[InlineData("public record C(int X, int Y$$)", "public record C(int X, int Y)")]
[InlineData("public record class C(int X, int Y$$)", "public record class C(int X, int Y)")]
[InlineData("public record struct C(int X, int Y$$)", "public record struct C(int X, int Y)")]
public void ParameterList_CouldBeHandled(string signature, string expectedSignature)
{
var code = $@"
Expand Down