Skip to content

Commit

Permalink
Add breaking changes doc for .NET 7 (#57152)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcouv authored Oct 14, 2021
1 parent df3d7a8 commit a38a57d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
12 changes: 0 additions & 12 deletions docs/compilers/CSharp/Compiler Breaking Changes - DotNet 6.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,3 @@ These are _function_type_conversions_.
}
```

4. 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 { }
```
14 changes: 14 additions & 0 deletions docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md
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 { }
```

0 comments on commit a38a57d

Please sign in to comment.