Skip to content

Commit

Permalink
Don't try to pass langversion 13 just yet
Browse files Browse the repository at this point in the history
csc in early previews doesn't seem to recognize it
  • Loading branch information
mhutch committed Feb 28, 2024
1 parent 4f33c8d commit 847ef03
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public static bool IsLangVersionArg (string arg) =>
//https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history
public static CSharpLangVersion FromNetCoreSdkVersion (SemVersion sdkVersion)
=> sdkVersion switch {
{ Major: 9 } => CSharpLangVersion.v13_0,
// disable .NET 9.0 -> C# 13 mapping for now, as csc in early .NET 9.0 previews
// doesn't recognize C# 13 as a valid version option
// { Major: 9 } => CSharpLangVersion.v13_0,
{ Major: 8 } => CSharpLangVersion.v12_0,
{ Major: 7 } => CSharpLangVersion.v11_0,
{ Major: 6 } => CSharpLangVersion.v10_0,
Expand Down

0 comments on commit 847ef03

Please sign in to comment.