Skip to content

Commit

Permalink
Move Default VB Version to 17.13 (#76452)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekseyTs authored Dec 17, 2024
1 parent f90fe25 commit 86c3401
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public void FeatureFlag()
""features"": {{
""debug-determinism"": ""true""
}},
""languageVersion"": ""VisualBasic16_9"",
""languageVersion"": ""VisualBasic17_13"",
""specifiedLanguageVersion"": ""Default"",
""preprocessorSymbols"": {{
""TARGET"": ""library"",
Expand All @@ -381,7 +381,7 @@ public void FeatureFlag()
""features"": {{
""debug-determinism"": ""true""
}},
""languageVersion"": ""VisualBasic16_9"",
""languageVersion"": ""VisualBasic17_13"",
""specifiedLanguageVersion"": ""Default"",
""preprocessorSymbols"": {{
""TARGET"": ""library"",
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/VisualBasic/Portable/LanguageVersion.vb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Case LanguageVersion.Latest
Return LanguageVersion.VisualBasic17_13
Case LanguageVersion.Default
Return LanguageVersion.VisualBasic16_9
Return LanguageVersion.VisualBasic17_13
Case Else
Return version
End Select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2056,9 +2056,7 @@ End Module").Path
<Fact>
Public Sub LanguageVersionAdded_Canary()
' When a new version is added, this test will break. This list must be checked:
' - update the "UpgradeProject" codefixer (not yet supported in VB)
' - update all the tests that call this canary
' - update the command-line documentation (CommandLine.md)
AssertEx.SetEqual({"default", "9", "10", "11", "12", "14", "15", "15.3", "15.5", "16", "16.9", "17.13", "latest"},
System.Enum.GetValues(GetType(LanguageVersion)).Cast(Of LanguageVersion)().Select(Function(v) v.ToDisplayString()))
' For minor versions, the format should be "x.y", such as "15.3"
Expand Down Expand Up @@ -2104,6 +2102,7 @@ End Module").Path
Assert.Equal(LanguageVersion.VisualBasic16, LanguageVersion.VisualBasic16.MapSpecifiedToEffectiveVersion())
Assert.Equal(LanguageVersion.VisualBasic16_9, LanguageVersion.VisualBasic16_9.MapSpecifiedToEffectiveVersion())
Assert.Equal(LanguageVersion.VisualBasic17_13, LanguageVersion.VisualBasic17_13.MapSpecifiedToEffectiveVersion())
Assert.Equal(LanguageVersion.VisualBasic17_13, LanguageVersion.Default.MapSpecifiedToEffectiveVersion())

' The canary check is a reminder that this test needs to be updated when a language version is added
LanguageVersionAdded_Canary()
Expand Down

0 comments on commit 86c3401

Please sign in to comment.