Re: [PATCH] Add support for C# record types
flat view
From: Johannes Schindelin <hidden>
Date: 2021-06-15 21:04:51
Hi Julian, On Tue, 2 Mar 2021, Julian Verdurmen via GitGitGadget wrote:
From: Julian Verdurmen <redacted>
Records are added in C# 9
Code example :
public record Person(string FirstName, string LastName);
For more information, see:
* https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9
Signed-off-by: Julian Verdurmen <redacted>I am not precisely a C# _expert_, but from what I understand this patch and commit message look good to me. Reviewed-by: Johannes Schindelin <redacted> Thanks, Dscho
quoted hunk ↗ jump to hunk
--- userdiff.c: Added support for record types in C# Support for C# 9 records. See https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/exploration/records I will try to use gitgitgadget [https://gitgitgadget.github.io/] Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-971%2F304NotModified%2Fcsharp-record-v1 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-971/304NotModified/csharp-record-v1 Pull-Request: https://github.com/git/git/pull/971 userdiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/userdiff.c b/userdiff.c index 3f81a2261c5e..2803683c3117 100644 --- a/userdiff.c +++ b/userdiff.c@@ -212,7 +212,7 @@ PATTERNS("csharp", /* Properties */ "^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[@._[:alnum:]]+)[ \t]*$\n" /* Type definitions */ - "^[ \t]*(((static|public|internal|private|protected|new|unsafe|sealed|abstract|partial)[ \t]+)*(class|enum|interface|struct)[ \t]+.*)$\n" + "^[ \t]*(((static|public|internal|private|protected|new|unsafe|sealed|abstract|partial)[ \t]+)*(class|enum|interface|struct|record)[ \t]+.*)$\n" /* Namespace */ "^[ \t]*(namespace[ \t]+.*)$", /* -- */base-commit: 328c10930387d301560f7cbcd3351cc485a13381 -- gitgitgadget