Before, the code:
int Value { get; } = 0; int Value { init; } = 0;
was formatted incoherently:
int Value { get; } = 0; int Value { init; } = 0;
because init was not recognised as an accessor specifier.
Paths
| Differential D121132
[clang-format] Handle C# 9 `init` accessor specifier. ClosedPublic Authored by curdeius on Mar 7 2022, 9:33 AM.
Details Summary Before, the code: int Value { get; } = 0; int Value { init; } = 0; was formatted incoherently: int Value { get; } = 0; int Value { init; } = 0; because init was not recognised as an accessor specifier.
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Mar 7 2022, 12:25 PM Closed by commit rG7a54fceb2562: [clang-format] Handle C# 9 `init` accessor specifier. (authored by curdeius). · Explain WhyMar 8 2022, 4:33 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 413763 clang/lib/Format/FormatToken.h
clang/lib/Format/TokenAnnotator.cpp
clang/lib/Format/UnwrappedLineParser.cpp
clang/unittests/Format/FormatTestCSharp.cpp
|
Oops, unrelated change, will revert.