Skip to content

Commit a7fa681

Browse files
Move to .NET 10 Preview 5 (#78906)
* Move to .NET 10 Preview 5 * Lint response * Lint response * Lint response * Lint response * Lint response * remove unused method * Lint response * Lint response * fix compiler side * more --------- Co-authored-by: Cyrus Najmabadi <[email protected]>
1 parent 345c918 commit a7fa681

File tree

93 files changed

+101
-178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+101
-178
lines changed

eng/targets/Settings.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<NoWarn>$(NoWarn);VSIXCompatibility1001</NoWarn>
1616

1717
<!-- TODO: https://github.com/dotnet/roslyn/issues/71667 -->
18-
<NoWarn>$(NoWarn);NU1507</NoWarn>
18+
<NoWarn>$(NoWarn);NU1507;NU1510</NoWarn>
1919

2020
<CommonExtensionInstallationRoot>CommonExtensions</CommonExtensionInstallationRoot>
2121
<LanguageServicesExtensionInstallationFolder>Microsoft\VBCSharp\LanguageServices</LanguageServicesExtensionInstallationFolder>

global.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"sdk": {
3-
"version": "9.0.106",
3+
"version": "10.0.100-preview.5.25277.114",
44
"allowPrerelease": false,
55
"rollForward": "patch"
66
},
77
"tools": {
8-
"dotnet": "9.0.106",
8+
"dotnet": "10.0.100-preview.5.25277.114",
99
"vs": {
10-
"version": "17.8.0"
10+
"version": "17.14.0"
1111
},
1212
"vswhere": "3.1.7"
1313
},

src/Analyzers/Core/Analyzers/Helpers/HashCodeAnalyzer/HashCodeAnalyzer.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@ namespace Microsoft.CodeAnalysis.Shared.Utilities;
1616
/// </summary>
1717
internal readonly partial struct HashCodeAnalyzer
1818
{
19-
private readonly Compilation _compilation;
2019
private readonly IMethodSymbol _objectGetHashCodeMethod;
2120
private readonly INamedTypeSymbol? _equalityComparerType;
2221

2322
public readonly INamedTypeSymbol SystemHashCodeType;
2423

2524
private HashCodeAnalyzer(
26-
Compilation compilation, IMethodSymbol objectGetHashCodeMethod,
25+
IMethodSymbol objectGetHashCodeMethod,
2726
INamedTypeSymbol? equalityComparerType, INamedTypeSymbol systemHashCodeType)
2827
{
29-
_compilation = compilation;
3028
_objectGetHashCodeMethod = objectGetHashCodeMethod;
3129
_equalityComparerType = equalityComparerType;
3230
SystemHashCodeType = systemHashCodeType;
@@ -47,7 +45,7 @@ public static bool TryGetAnalyzer(Compilation compilation, [NotNullWhen(true)] o
4745
if (systemHashCodeType == null)
4846
return false;
4947

50-
analyzer = new HashCodeAnalyzer(compilation, objectGetHashCodeMethod, equalityComparerType, systemHashCodeType);
48+
analyzer = new HashCodeAnalyzer(objectGetHashCodeMethod, equalityComparerType, systemHashCodeType);
5149
return true;
5250
}
5351

src/Compilers/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ dotnet_diagnostic.RS0100.severity = none
1212
# RS0102: Braces must not have blank lines between them
1313
dotnet_diagnostic.RS0102.severity = none
1414

15+
# IDE0051: Unused member
16+
dotnet_diagnostic.IDE0051.severity = none
17+
1518
# IDE0170: Prefer extended property pattern
1619
dotnet_diagnostic.IDE0170.severity = suggestion
1720

src/Compilers/CSharp/Portable/Parser/LanguageParser_Patterns.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ when ConvertExpressionToType(expr, out var leftType):
4747
default:
4848
type = null;
4949
return false;
50-
};
50+
}
5151
}
5252

5353
private PatternSyntax ParsePattern(Precedence precedence, bool afterIs = false, bool inSwitchArmPattern = false)

src/Compilers/CSharp/Portable/Parser/Lexer_RawStringLiteral.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private void ScanRawStringLiteral(ref TokenInfo info, bool inDirective)
117117

118118
default:
119119
throw ExceptionUtilities.UnexpectedValue(info.Kind);
120-
};
120+
}
121121
}
122122

123123
info.Text = TextWindow.GetText(intern: true);

src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenOverridingAndHiding.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4126,7 +4126,7 @@ static void Main()
41264126
if (isFromMetadata)
41274127
{
41284128
VerifyParamArrayAttribute(parameterB);
4129-
};
4129+
}
41304130
};
41314131

41324132
var verifier = CompileAndVerify(source, symbolValidator: validator(true), sourceSymbolValidator: validator(false), expectedOutput: @"System.Int32[]");

src/Compilers/CSharp/Test/Emit/CodeGen/WinMdDelegateTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void SimpleDelegateMembersTest(string ob, string cb)
4141
GetMember<NamedTypeSymbol>("voidDelegate").GetMembers().ToArray();
4242

4343
AssertEx.SetEqual(actualMembers.Select(s => s.Name), expectedMembers);
44-
};
44+
}
4545
};
4646

4747
VerifyType verify = (winmd, expected) =>

src/Compilers/CSharp/Test/Emit3/Attributes/AttributeTests_IsByRefLike.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ void validate(ModuleSymbol module)
683683
AssertDeclaresType(peModule, WellKnownType.System_Runtime_CompilerServices_IsByRefLikeAttribute, Accessibility.Public);
684684
AssertHasCompilerFeatureRequired(includeCompilerFeatureRequired, peType, peModule, new MetadataDecoder(peModule));
685685
}
686-
};
686+
}
687687

688688
CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: validate, sourceSymbolValidator: validate);
689689
}

src/Compilers/CSharp/Test/Emit3/Attributes/AttributeTests_WellKnownAttributes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5752,7 +5752,7 @@ void metadataValidator(ModuleSymbol module)
57525752

57535753
Assert.Equal(new[] { "CompilerGeneratedAttribute" }, GetAttributeNames(method.GetAttributes()));
57545754
Assert.True(method.RequiresSecurityObject);
5755-
};
5755+
}
57565756

57575757
var verifier = CompileAndVerify(
57585758
source,

0 commit comments

Comments
 (0)