Skip to content

Commit 6540252

Browse files
author
Julien Couvreur
authored
Add LanguageVersion for C# 14 (#79725)
1 parent 691754b commit 6540252

File tree

78 files changed

+1785
-1068
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1785
-1068
lines changed

docs/Language Feature Status.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,7 @@ efforts behind them.
1111
| Feature | Branch | State | Developer | Reviewer | IDE Buddy | LDM Champ |
1212
| ------- | ------ | ----- | --------- | -------- | --------- | --------- |
1313
| Runtime Async | [runtime-async](https://github.com/dotnet/roslyn/tree/features/runtime-async) | [In Progress](https://github.com/dotnet/roslyn/issues/75960) | [333fred](https://github.com/333fred) | [jcouv](https://github.com/jcouv), [RikkiGibson](https://github.com/RikkiGibson) | | |
14-
| [`field` keyword in properties](https://github.com/dotnet/csharplang/issues/140) | [field-keyword](https://github.com/dotnet/roslyn/tree/features/field-keyword) | [Merged into 17.12p3](https://github.com/dotnet/roslyn/issues/57012) | [Youssef1313](https://github.com/Youssef1313), [cston](https://github.com/cston) | [333fred](https://github.com/333fred), [RikkiGibson](https://github.com/RikkiGibson) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
15-
| [First-class Span Types](https://github.com/dotnet/csharplang/issues/7905) | [FirstClassSpan](https://github.com/dotnet/roslyn/tree/features/FirstClassSpan) | [Merged into 17.13p1](https://github.com/dotnet/roslyn/issues/73445) | [jjonescz](https://github.com/jjonescz) | [cston](https://github.com/cston), [333fred](https://github.com/333fred) | | [333fred](https://github.com/333fred), [stephentoub](https://github.com/stephentoub) |
16-
| [Unbound generic types in `nameof`](https://github.com/dotnet/csharplang/issues/8480) | [PR](https://github.com/dotnet/roslyn/pull/75368) | [Merged into 17.13p2](https://github.com/dotnet/roslyn/pull/75368) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jcouv](https://github.com/jcouv), [AlekseyTs](https://github.com/AlekseyTs) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
17-
| [String literals in data section as UTF8](https://github.com/dotnet/roslyn/blob/main/docs/features/string-literals-data-section.md) | [PR](https://github.com/dotnet/roslyn/pull/76036) | [Merged into 17.13p4](https://github.com/dotnet/roslyn/issues/76234) | [jjonescz](https://github.com/jjonescz) | [AlekseyTs](https://github.com/AlekseyTs), [cston](https://github.com/cston) | N/A | N/A |
18-
| [Simple lambda parameters with modifiers](https://github.com/dotnet/csharplang/blob/main/proposals/simple-lambda-parameters-with-modifiers.md) | [PR](https://github.com/dotnet/roslyn/pull/75400) | [Merged into 17.14p1](https://github.com/dotnet/roslyn/pull/75400) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jjonescz](https://github.com/jjonescz), [cston](https://github.com/cston) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
19-
| [Partial Events and Constructors](https://github.com/dotnet/csharplang/issues/9058) | [PartialEventsCtors](https://github.com/dotnet/roslyn/tree/features/PartialEventsCtors) | [Merged into 17.14p3](https://github.com/dotnet/roslyn/issues/76859) | [jjonescz](https://github.com/jjonescz) | [cston](https://github.com/cston), [RikkiGibson](https://github.com/RikkiGibson) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jaredpar](https://github.com/jaredpar) |
20-
| [Extensions](https://github.com/dotnet/csharplang/issues/8697) | [extensions](https://github.com/dotnet/roslyn/tree/features/extensions) | [Preview merged into 17.14p3](https://github.com/dotnet/roslyn/issues/76130) | [jcouv](https://github.com/jcouv), [AlekseyTs](https://github.com/AlekseyTs) | [jjonescz](https://github.com/jjonescz), TBD | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [MadsTorgersen](https://github.com/MadsTorgersen) |
21-
| [Null-conditional assignment](https://github.com/dotnet/csharplang/issues/6045) | [null-conditional-assignment](https://github.com/dotnet/roslyn/tree/features/null-conditional-assignment) | [Merged into 17.14p3](https://github.com/dotnet/roslyn/issues/75554) | [RikkiGibson](https://github.com/RikkiGibson) | [cston](https://github.com/cston), [jjonescz](https://github.com/jjonescz) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [RikkiGibson](https://github.com/RikkiGibson) |
22-
| [Ignored directives](https://github.com/dotnet/csharplang/issues/8617) | [PR](https://github.com/dotnet/roslyn/pull/77696) | Merged into 17.14p3 | [jjonescz](https://github.com/jjonescz) | [RikkiGibson](https://github.com/RikkiGibson), [jaredpar](https://github.com/jaredpar) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jaredpar](https://github.com/jaredpar) |
2314
| [Dictionary expressions](https://github.com/dotnet/csharplang/issues/8659) | [dictionary-expressions](https://github.com/dotnet/roslyn/tree/features/dictionary-expressions) | [In progress](https://github.com/dotnet/roslyn/issues/76310) | [cston](https://github.com/cston), [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [333fred](https://github.com/333fred), [jcouv](https://github.com/jcouv) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
24-
| [User Defined Compound Assignment Operators](https://github.com/dotnet/csharplang/issues/9101) | [UserDefinedCompoundAssignment](https://github.com/dotnet/roslyn/tree/features/UserDefinedCompoundAssignment) | [Merged to main](https://github.com/dotnet/roslyn/issues/76934) | [AlekseyTs](https://github.com/AlekseyTs) | [333fred](https://github.com/333fred), [cston](https://github.com/cston) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [AlekseyTs](https://github.com/AlekseyTs) |
2515

2616
# Working Set VB
2717

@@ -30,6 +20,21 @@ efforts behind them.
3020
| Recognizing 'unmanaged' constraint | main | [Merged into 17.13 P2](https://github.com/dotnet/roslyn/pull/75665) | [AlekseyTs](https://github.com/AlekseyTs) | [cston](https://github.com/cston), [333fred](https://github.com/333fred) | (no IDE impact) | [jaredpar](https://github.com/jaredpar) |
3121
| Overload Resolution Priority | main | [Merged into 17.13 P3](https://github.com/dotnet/roslyn/pull/76419) | [AlekseyTs](https://github.com/AlekseyTs) | [333fred](https://github.com/333fred), [cston](https://github.com/cston) | (no IDE impact) | [333fred](https://github.com/333fred) |
3222

23+
# C# 14.0
24+
25+
| Feature | Branch | State | Developer | Reviewer | IDE Buddy | LDM Champ |
26+
| ------- | ------ | ----- | --------- | -------- | --------- | --------- |
27+
| [`field` keyword in properties](https://github.com/dotnet/csharplang/issues/8635) | [field-keyword](https://github.com/dotnet/roslyn/tree/features/field-keyword) | [Merged into 17.12p3](https://github.com/dotnet/roslyn/issues/57012) | [Youssef1313](https://github.com/Youssef1313), [cston](https://github.com/cston) | [333fred](https://github.com/333fred), [RikkiGibson](https://github.com/RikkiGibson) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
28+
| [First-class Span Types](https://github.com/dotnet/csharplang/issues/8714) | [FirstClassSpan](https://github.com/dotnet/roslyn/tree/features/FirstClassSpan) | [Merged into 17.13p1](https://github.com/dotnet/roslyn/issues/73445) | [jjonescz](https://github.com/jjonescz) | [cston](https://github.com/cston), [333fred](https://github.com/333fred) | | [333fred](https://github.com/333fred), [stephentoub](https://github.com/stephentoub) |
29+
| [Unbound generic types in `nameof`](https://github.com/dotnet/csharplang/issues/8662) | [PR](https://github.com/dotnet/roslyn/pull/75368) | [Merged into 17.13p2](https://github.com/dotnet/roslyn/pull/75368) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jcouv](https://github.com/jcouv), [AlekseyTs](https://github.com/AlekseyTs) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
30+
| [String literals in data section as UTF8](https://github.com/dotnet/roslyn/blob/main/docs/features/string-literals-data-section.md) | [PR](https://github.com/dotnet/roslyn/pull/76036) | [Merged into 17.13p4](https://github.com/dotnet/roslyn/issues/76234) | [jjonescz](https://github.com/jjonescz) | [AlekseyTs](https://github.com/AlekseyTs), [cston](https://github.com/cston) | N/A | N/A |
31+
| [Simple lambda parameters with modifiers](https://github.com/dotnet/csharplang/issues/8637) | [PR](https://github.com/dotnet/roslyn/pull/75400) | [Merged into 17.14p1](https://github.com/dotnet/roslyn/pull/75400) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jjonescz](https://github.com/jjonescz), [cston](https://github.com/cston) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
32+
| [Partial Events and Constructors](https://github.com/dotnet/csharplang/issues/9058) | [PartialEventsCtors](https://github.com/dotnet/roslyn/tree/features/PartialEventsCtors) | [Merged into 17.14p3](https://github.com/dotnet/roslyn/issues/76859) | [jjonescz](https://github.com/jjonescz) | [cston](https://github.com/cston), [RikkiGibson](https://github.com/RikkiGibson) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jaredpar](https://github.com/jaredpar) |
33+
| [Extensions](https://github.com/dotnet/csharplang/issues/8697) | [extensions](https://github.com/dotnet/roslyn/tree/features/extensions) | [Merged into 17.14p3](https://github.com/dotnet/roslyn/issues/76130) | [jcouv](https://github.com/jcouv), [AlekseyTs](https://github.com/AlekseyTs) | [jjonescz](https://github.com/jjonescz), TBD | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [MadsTorgersen](https://github.com/MadsTorgersen) |
34+
| [Null-conditional assignment](https://github.com/dotnet/csharplang/issues/8677) | [null-conditional-assignment](https://github.com/dotnet/roslyn/tree/features/null-conditional-assignment) | [Merged into 17.14p3](https://github.com/dotnet/roslyn/issues/75554) | [RikkiGibson](https://github.com/RikkiGibson) | [cston](https://github.com/cston), [jjonescz](https://github.com/jjonescz) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [RikkiGibson](https://github.com/RikkiGibson) |
35+
| [Ignored directives](https://github.com/dotnet/csharplang/issues/8617) | [PR](https://github.com/dotnet/roslyn/pull/77696) | Merged into 17.14p3 | [jjonescz](https://github.com/jjonescz) | [RikkiGibson](https://github.com/RikkiGibson), [jaredpar](https://github.com/jaredpar) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jaredpar](https://github.com/jaredpar) |
36+
| [User Defined Compound Assignment Operators](https://github.com/dotnet/csharplang/issues/9101) | [UserDefinedCompoundAssignment](https://github.com/dotnet/roslyn/tree/features/UserDefinedCompoundAssignment) | [Merged to main](https://github.com/dotnet/roslyn/issues/76934) | [AlekseyTs](https://github.com/AlekseyTs) | [333fred](https://github.com/333fred), [cston](https://github.com/cston) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [AlekseyTs](https://github.com/AlekseyTs) |
37+
| [Optional and named arguments in `Expression` trees](https://github.com/dotnet/csharplang/issues/9246) | [PR](https://github.com/dotnet/roslyn/pull/77972) | Merged to main(https://github.com/dotnet/roslyn/issues/76934) | [cston](https://github.com/cston) | [333fred](https://github.com/333fred), [AlekseyTs](https://github.com/AlekseyTs) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [cston](https://github.com/cston) |
3338

3439
# C# 13.0
3540

src/Analyzers/CSharp/CodeFixes/UpgradeProject/CSharpUpgradeProjectCodeFixProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ internal sealed class CSharpUpgradeProjectCodeFixProvider() : AbstractUpgradePro
5656
"CS9194",
5757
"CS9202",
5858
"CS9260",
59+
"CS9327"
5960
];
6061

6162
public override string UpgradeThisProjectResource => CSharpCodeFixesResources.Upgrade_this_project_to_csharp_language_version_0;

src/Analyzers/CSharp/Tests/GenerateMethod/GenerateMethodTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10575,7 +10575,7 @@ private int Goo()
1057510575
throw new NotImplementedException();
1057610576
}
1057710577
}
10578-
""", new(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersionExtensions.CSharpNext)));
10578+
""", new(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp14)));
1057910579

1058010580
[Fact]
1058110581
public Task TestNullConditionalAssignment2()
@@ -10612,5 +10612,5 @@ private int Goo()
1061210612
throw new NotImplementedException();
1061310613
}
1061410614
}
10615-
""", new(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersionExtensions.CSharpNext)));
10615+
""", new(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp14)));
1061610616
}

src/Analyzers/CSharp/Tests/ImplementInterface/ImplementInterfaceCodeFixTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11836,7 +11836,7 @@ class C1 : I1
1183611836
}
1183711837
""",
1183811838
ReferenceAssemblies = ReferenceAssemblies.Net.Net80,
11839-
LanguageVersion = LanguageVersionExtensions.CSharpNext,
11839+
LanguageVersion = LanguageVersion.CSharp14,
1184011840
}.RunAsync();
1184111841

1184211842
[Fact, WorkItem("https://github.com/dotnet/roslyn/issues/78281")]
@@ -11878,7 +11878,7 @@ class C1 : I1
1187811878
""",
1187911879
CodeActionIndex = 1,
1188011880
ReferenceAssemblies = ReferenceAssemblies.Net.Net80,
11881-
LanguageVersion = LanguageVersionExtensions.CSharpNext,
11881+
LanguageVersion = LanguageVersion.CSharp14,
1188211882
}.RunAsync();
1188311883

1188411884
[Fact, WorkItem("https://github.com/dotnet/roslyn/issues/79584")]
@@ -11900,7 +11900,7 @@ class C : IDisposable
1190011900
""".Replace("\r\n", "\n"),
1190111901
CodeActionIndex = 1,
1190211902
ReferenceAssemblies = ReferenceAssemblies.Net.Net80,
11903-
LanguageVersion = LanguageVersionExtensions.CSharpNext,
11903+
LanguageVersion = LanguageVersion.CSharp14,
1190411904
Options = { { FormattingOptions2.NewLine, "\n" } },
1190511905
}.RunAsync();
1190611906
}

src/Analyzers/CSharp/Tests/UpgradeProject/UpgradeProjectTests.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,4 +1153,15 @@ void M2(ref int y)
11531153
""",
11541154
expected: LanguageVersion.CSharp12,
11551155
new CSharpParseOptions(LanguageVersion.CSharp11));
1156+
1157+
[Fact]
1158+
public Task UpgradeProjectForUserDefinedCompoundAssignment()
1159+
=> TestLanguageVersionUpgradedAsync("""
1160+
class C
1161+
{
1162+
public C operator [|+=|](C c) => c;
1163+
}
1164+
""",
1165+
expected: LanguageVersion.CSharp14,
1166+
new CSharpParseOptions(LanguageVersion.CSharp13));
11561167
}

src/Analyzers/CSharp/Tests/UseAutoProperty/UseAutoPropertyTests_Field.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.UseAutoProperty;
1515
public sealed partial class UseAutoPropertyTests
1616
{
1717
private static readonly ParseOptions CSharp13 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp13);
18-
private static readonly ParseOptions CSharp14 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersionExtensions.CSharpNext);
18+
private static readonly ParseOptions CSharp14 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp14);
1919

2020
[Fact]
2121
public Task TestNotInCSharp13()

src/Analyzers/CSharp/Tests/UseConditionalExpression/UseConditionalExpressionForAssignmentTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2365,5 +2365,5 @@ void M(C c)
23652365
}
23662366
}
23672367
""",
2368-
languageVersion: LanguageVersionExtensions.CSharpNext);
2368+
languageVersion: LanguageVersion.CSharp14);
23692369
}

src/Analyzers/CSharp/Tests/UseExpressionBody/UseExpressionBodyForPropertiesAnalyzerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ object Goo
542542
} = new();
543543
}
544544
""";
545-
await TestWithUseExpressionBody(code, code, LanguageVersionExtensions.CSharpNext);
545+
await TestWithUseExpressionBody(code, code, LanguageVersion.CSharp14);
546546
}
547547

548548
[Fact, WorkItem("https://github.com/dotnet/roslyn/issues/77473")]
@@ -560,6 +560,6 @@ object Goo
560560
} = new();
561561
}
562562
""";
563-
await TestWithUseExpressionBody(code, code, LanguageVersionExtensions.CSharpNext);
563+
await TestWithUseExpressionBody(code, code, LanguageVersion.CSharp14);
564564
}
565565
}

src/Analyzers/CSharp/Tests/UseImplicitlyTypedLambdaExpression/UseImplicitlyTypedLambdaExpressionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.UseImplicitlyTypedLambd
1919
[Trait(Traits.Feature, Traits.Features.CodeActionsUseImplicitObjectCreation)]
2020
public sealed class UseImplicitlyTypedLambdaExpressionTests
2121
{
22-
private static readonly LanguageVersion CSharp14 = LanguageVersionExtensions.CSharpNext;
22+
private static readonly LanguageVersion CSharp14 = LanguageVersion.CSharp14;
2323

2424
[Fact]
2525
public Task TestAssignedToObject()

src/Analyzers/CSharp/Tests/UseNullPropagation/UseNullPropagationTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2377,7 +2377,7 @@ void M(C c)
23772377
}
23782378
}
23792379
""",
2380-
languageVersion: LanguageVersionExtensions.CSharpNext);
2380+
languageVersion: LanguageVersion.CSharp14);
23812381

23822382
[Fact]
23832383
public Task TestNullConditionalAssignment2()
@@ -2431,7 +2431,7 @@ void M(C c)
24312431
}
24322432
}
24332433
""",
2434-
languageVersion: LanguageVersionExtensions.CSharpNext);
2434+
languageVersion: LanguageVersion.CSharp14);
24352435

24362436
[Fact]
24372437
public Task TestNullAssignmentAfterOperation2()
@@ -2469,7 +2469,7 @@ void M(C c)
24692469
}
24702470
}
24712471
""",
2472-
languageVersion: LanguageVersionExtensions.CSharpNext);
2472+
languageVersion: LanguageVersion.CSharp14);
24732473

24742474
[Fact]
24752475
public Task TestNotNullAssignmentAfterOperation1()
@@ -2491,7 +2491,7 @@ void M(C c)
24912491
}
24922492
}
24932493
""",
2494-
languageVersion: LanguageVersionExtensions.CSharpNext);
2494+
languageVersion: LanguageVersion.CSharp14);
24952495

24962496
[Fact]
24972497
public Task TestNotNullAssignmentAfterOperation2()
@@ -2513,7 +2513,7 @@ void M(C c)
25132513
}
25142514
}
25152515
""",
2516-
languageVersion: LanguageVersionExtensions.CSharpNext);
2516+
languageVersion: LanguageVersion.CSharp14);
25172517

25182518
[Fact]
25192519
public Task TestNotNullAssignmentAfterOperation3()
@@ -2535,7 +2535,7 @@ void M(C c, C d)
25352535
}
25362536
}
25372537
""",
2538-
languageVersion: LanguageVersionExtensions.CSharpNext);
2538+
languageVersion: LanguageVersion.CSharp14);
25392539

25402540
[Fact]
25412541
public Task TestNotNullAssignmentAfterOperation4()
@@ -2557,7 +2557,7 @@ void M(C c)
25572557
}
25582558
}
25592559
""",
2560-
languageVersion: LanguageVersionExtensions.CSharpNext);
2560+
languageVersion: LanguageVersion.CSharp14);
25612561

25622562
[Fact]
25632563
public Task TestNullAssignmentAfterOperation_TopLevel1()
@@ -2591,7 +2591,7 @@ class C
25912591
}
25922592
""",
25932593
OutputKind.ConsoleApplication,
2594-
LanguageVersionExtensions.CSharpNext);
2594+
LanguageVersion.CSharp14);
25952595

25962596
[Fact]
25972597
public Task TestNullAssignmentAfterOperation_TopLevel2()
@@ -2627,7 +2627,7 @@ class C
26272627
}
26282628
""",
26292629
OutputKind.ConsoleApplication,
2630-
LanguageVersionExtensions.CSharpNext);
2630+
LanguageVersion.CSharp14);
26312631

26322632
[Fact, WorkItem("https://github.com/dotnet/roslyn/issues/79338")]
26332633
public Task TestNestedNullPropagation_DifferentForms()
@@ -2663,5 +2663,5 @@ void M(C c)
26632663
void X(string s) { }
26642664
}
26652665
""",
2666-
languageVersion: LanguageVersionExtensions.CSharpNext);
2666+
languageVersion: LanguageVersion.CSharp14);
26672667
}

0 commit comments

Comments
 (0)