-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add breaking changes doc for .NET 7 (#57152)
- Loading branch information
Showing
2 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## This document lists known breaking changes in Roslyn after .NET 6 all the way to .NET 7. | ||
|
||
1. In Visual Studio 17.1, the contextual keyword `var` cannot be used as an explicit lambda return type. | ||
|
||
```csharp | ||
using System; | ||
|
||
F(var () => default); // error: 'var' cannot be used as an explicit lambda return type | ||
F(@var () => default); // ok | ||
static void F(Func<var> f) { } | ||
|
||
class var { } | ||
``` |