diff --git a/dotnet-tools.json b/dotnet-tools.json index b8d5a0aada491..447b894f9dc94 100644 --- a/dotnet-tools.json +++ b/dotnet-tools.json @@ -2,7 +2,7 @@ "isRoot": true, "tools": { "dotnet-format": { - "version": "6.2.315104", + "version": "6.3.317301", "commands": [ "dotnet-format" ] diff --git a/eng/Versions.props b/eng/Versions.props index 2cd9897b4ab0b..f9a86674605fb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -24,7 +24,7 @@ 1.1.2-beta1.22122.4 0.1.132-beta - 4.1.0 + 4.2.0-2.final 17.2.178-preview 17.2.140-preview-ga1e1777dca 5.0.0-alpha1.19409.1 diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs index caaadc4583465..7c0665475b361 100644 --- a/src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs +++ b/src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs @@ -3133,12 +3133,13 @@ public void RefAssignment_Foreach() void verify(string variableType, string itemType, params DiagnosticDescription[] expected) { - var source = @" + var source = $$""" + class C { void M(RefEnumerable collection) { - foreach (ref VARTYPE item in collection) + foreach (ref {{variableType}} item in collection) { item.ToString(); } @@ -3149,13 +3150,14 @@ class RefEnumerable public StructEnum GetEnumerator() => throw null!; public struct StructEnum { - public ref ITEMTYPE Current => throw null!; + public ref {{itemType}} Current => throw null!; public bool MoveNext() => throw null!; } } -}"; +} +"""; - var comp = CreateCompilation(source.Replace("VARTYPE", variableType).Replace("ITEMTYPE", itemType), options: WithNullableEnable()); + var comp = CreateCompilation(source, options: WithNullableEnable()); comp.VerifyDiagnostics(expected); } }