Skip to content

Commit

Permalink
Merge pull request #52697 from Youssef1313/patch-17
Browse files Browse the repository at this point in the history
Support record structs in complete statement command
  • Loading branch information
CyrusNajmabadi authored Apr 22, 2021
2 parents a657570 + 4c351d8 commit bba92f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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

0 comments on commit bba92f9

Please sign in to comment.