未验证 提交 7de83934 编写于 作者: C Charles Stoner 提交者: GitHub

Fix typos (#47264)

上级 eb0581d3
......@@ -389,7 +389,7 @@ private static bool OverloadResolutionResultIsValid<TMember>(ArrayBuilder<Member
private static void RemoveMethodsNotDeclaredStatic<TMember>(ArrayBuilder<MemberResolutionResult<TMember>> results) where TMember : Symbol
{
// RemoveStaticInstanceMistmatches allows methods that do not need a reciever but are not declared static,
// RemoveStaticInstanceMismatches allows methods that do not need a receiver but are not declared static,
// such as a local function that is not declared static. This eliminates methods that are not actually
// declared as static
for (int f = 0; f < results.Count; f++)
......
......@@ -128,7 +128,7 @@ public enum LanguageVersion
/// </summary>
CSharp8 = 800,
// When this value is available in the released NuGet packge, update LanguageVersionExtensions in the IDE layer to point to it.
// When this value is available in the released NuGet package, update LanguageVersionExtensions in the IDE layer to point to it.
// https://github.com/dotnet/roslyn/issues/43348
//
/// <summary>
......
......@@ -965,18 +965,18 @@ internal static bool RequiresExplicitOverride(this MethodSymbol method, out bool
// However, if there was a duplicate definition for the runtime signature of the overridden
// method where it was originally declared, that would have been an error. In that case we suppress
// the warning as a cascaded diagnostic.
bool originalOverriddenMethodWasAmbiguious =
bool originalOverriddenMethodWasAmbiguous =
csharpOverriddenMethod.IsDefinition || csharpOverriddenMethod.OriginalDefinition.MethodHasRuntimeCollision();
warnAmbiguous = !originalOverriddenMethodWasAmbiguious;
warnAmbiguous = !originalOverriddenMethodWasAmbiguous;
bool overridenMethodContainedInSameTypeAsRuntimeOverriddenMethod =
bool overriddenMethodContainedInSameTypeAsRuntimeOverriddenMethod =
csharpOverriddenMethod.ContainingType.Equals(runtimeOverriddenMethod.ContainingType, TypeCompareKind.CLRSignatureCompareOptions);
// If the overridden method is on a different (e.g. base) type compared to the runtime overridden
// method, then the runtime overridden method could not possibly resolve correctly to the overridden method.
// In this case we might as well produce a methodimpl. At least it has a chance of being correctly resolved
// by the runtime, where the runtime resolution without the methodimpl would definitely be wrong.
if (!overridenMethodContainedInSameTypeAsRuntimeOverriddenMethod)
if (!overriddenMethodContainedInSameTypeAsRuntimeOverriddenMethod)
return true;
// This is the historical test, preserved since the days of the native compiler in case it turns out to affect compatibility.
......
......@@ -995,14 +995,14 @@ internal bool DeriveUseSiteDiagnosticFromType(ref DiagnosticInfo result, TypeSym
{
if (info.Code == (int)ErrorCode.ERR_BogusType)
{
info = GetSymbolSpecificUnsupprtedMetadataUseSiteErrorInfo() ?? info;
info = GetSymbolSpecificUnsupportedMetadataUseSiteErrorInfo() ?? info;
}
}
return MergeUseSiteDiagnostics(ref result, info);
}
private DiagnosticInfo GetSymbolSpecificUnsupprtedMetadataUseSiteErrorInfo()
private DiagnosticInfo GetSymbolSpecificUnsupportedMetadataUseSiteErrorInfo()
{
switch (this.Kind)
{
......@@ -1092,7 +1092,7 @@ internal bool DeriveUseSiteDiagnosticFromCustomModifiers(ref DiagnosticInfo resu
if (current == AllowedRequiredModifierType.None ||
(current != requiredModifiersFound && requiredModifiersFound != AllowedRequiredModifierType.None)) // At the moment we don't support applying different allowed modreqs to the same target.
{
if (MergeUseSiteDiagnostics(ref result, GetSymbolSpecificUnsupprtedMetadataUseSiteErrorInfo() ?? new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty)))
if (MergeUseSiteDiagnostics(ref result, GetSymbolSpecificUnsupportedMetadataUseSiteErrorInfo() ?? new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty)))
{
return true;
}
......
......@@ -12368,12 +12368,12 @@ class C
// Verify analyzers were executed only if both the following conditions were satisfied:
// 1. Current assembly was added as an analyzer reference, i.e. "includeCurrentAssemblyAsAnalyzerReference = true" and
// 2. We did not explicitly request skipping analyzers, i.e. "skipAnalyzers = false".
var expectedAnalayzerExecution = includeCurrentAssemblyAsAnalyzerReference && !skipAnalyzers;
var expectedAnalyzerExecution = includeCurrentAssemblyAsAnalyzerReference && !skipAnalyzers;
// 'WarningDiagnosticAnalyzer' generates a warning for each named type.
// We expect two warnings for this test: type "C" defined in source and the source generator defined type.
// Additionally, we also have an analyzer that generates "warning CS8032: An instance of analyzer cannot be created"
var expectedWarningCount = expectedAnalayzerExecution ? 3 : 0;
var expectedWarningCount = expectedAnalyzerExecution ? 3 : 0;
var output = VerifyOutput(dir, src, includeCurrentAssemblyAsAnalyzerReference,
expectedWarningCount: expectedWarningCount,
......@@ -12384,7 +12384,7 @@ class C
var generatorPrefix = $"{generator.GetType().Module.ModuleVersionId}_{generator.GetType().FullName}";
ValidateEmbeddedSources_Portable(new Dictionary<string, string> { { Path.Combine(dir.Path, $"{generatorPrefix}_generatedSource.cs"), generatedSource } }, dir, true);
if (expectedAnalayzerExecution)
if (expectedAnalyzerExecution)
{
Assert.Contains("warning Warning01", output, StringComparison.Ordinal);
Assert.Contains("warning CS8032", output, StringComparison.Ordinal);
......
......@@ -3434,7 +3434,7 @@ static void F(IEnumerable<C> c)
);
}
// Attempting to call `ConstantValue` on every constiuent string component times out the IOperation runner.
// Attempting to call `ConstantValue` on every constituent string component times out the IOperation runner.
// Instead, we manually validate just the top level
[ConditionalFact(typeof(NoIOperationValidation)), WorkItem(43019, "https://github.com/dotnet/roslyn/issues/43019")]
public void TestLargeStringConcatenation()
......
......@@ -2031,7 +2031,7 @@ public void Equality_UnmanagedExtensionModifiers()
static void verifyEquality((FunctionPointerTypeSymbol NoRef, FunctionPointerTypeSymbol ByRef) ptr1, (FunctionPointerTypeSymbol NoRef, FunctionPointerTypeSymbol ByRef) ptr2, bool expectedConventionEquality, bool expectedFullEquality, bool skipGetCallingConventionModifiersCheck = false)
{
// No equality between pointers with differring refkinds
// No equality between pointers with differing refkinds
Assert.False(ptr1.NoRef.Equals(ptr2.ByRef, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds));
Assert.False(ptr1.NoRef.Equals(ptr2.ByRef, TypeCompareKind.ConsiderEverything));
Assert.False(ptr1.ByRef.Equals(ptr2.NoRef, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds));
......@@ -2101,7 +2101,7 @@ public static class RuntimeFeature
static void verifyEquality((FunctionPointerTypeSymbol NoRef, FunctionPointerTypeSymbol ByRef) ptr1, (FunctionPointerTypeSymbol NoRef, FunctionPointerTypeSymbol ByRef) ptr2, bool expectedConventionEquality, bool expectedFullEquality)
{
// No equality between pointers with differring refkinds
// No equality between pointers with differing refkinds
Assert.False(ptr1.NoRef.Equals(ptr2.ByRef, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds));
Assert.False(ptr1.NoRef.Equals(ptr2.ByRef, TypeCompareKind.ConsiderEverything));
Assert.False(ptr1.ByRef.Equals(ptr2.NoRef, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds));
......@@ -2157,7 +2157,7 @@ public void Equality_DifferingRefAndTypeCustomModifiers()
static void verifyEquality((FunctionPointerTypeSymbol NoRef, FunctionPointerTypeSymbol ByRef) ptr1, (FunctionPointerTypeSymbol NoRef, FunctionPointerTypeSymbol ByRef) ptr2, bool expectedTypeConventionEquality, bool expectedRefConventionEquality)
{
// No equality between pointers with differring refkinds
// No equality between pointers with differing refkinds
Assert.False(ptr1.NoRef.Equals(ptr2.ByRef, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds));
Assert.False(ptr1.NoRef.Equals(ptr2.ByRef, TypeCompareKind.ConsiderEverything));
Assert.False(ptr1.ByRef.Equals(ptr2.NoRef, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds));
......
......@@ -6,7 +6,7 @@ This MSBuild tasks contains the core tasks and targets for compiling C# and VB p
Debugging this code requires a bit of setup because it's not an independent component. It relies on having other parts of the toolset deployed in the same directory. Additionally the project being debugged needs to be modified to ensure this DLL is built instead of the one that ships along side MSBuild.
Set the startup project to Toolset. This project properly delpoys all of the necessary components and hence provides a simple F5 experience.
Set the startup project to Toolset. This project properly deploys all of the necessary components and hence provides a simple F5 experience.
Next modify the Debug settings for Toolset. The startup program needs to be MSBuild.exe. Set the "start external program" field to the full path of MSBuild:
......
......@@ -15,7 +15,7 @@ namespace Microsoft.CodeAnalysis
internal readonly struct GeneratorState
{
/// <summary>
/// Gets an uninitalized generator state
/// Gets an uninitialized generator state
/// </summary>
internal static GeneratorState Uninitialized;
......
......@@ -118,7 +118,7 @@ private static async Task<CompletionData> WriteBuildResponseAsync(IClientConnect
private async Task<CompletionData> ProcessCompilationRequestAsync(IClientConnection clientConnection, BuildRequest request, CancellationToken cancellationToken)
{
// Need to wait for the compilation and client disconnection in parallel. If the client
// suddenly disconnects we need to cancel the compilation that is occuring. It could be the
// suddenly disconnects we need to cancel the compilation that is occurring. It could be the
// client hit Ctrl-C due to a run away analyzer.
var buildCancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
var compilationTask = ProcessCompilationRequestCore(CompilerServerHost, request, buildCancellationTokenSource.Token);
......
......@@ -97,7 +97,7 @@ public void EndListening()
try
{
// Even though the Tasks created to run the compilation servers can never throw,
// the CancellationToken from this source ends up getting passeed throughout the
// the CancellationToken from this source ends up getting passed throughout the
// named pipe infrastructure. Parts of that infrastructure hook into
// CancellationToken.Register and those will throw during a Cancel operation.
//
......
......@@ -82,10 +82,10 @@ public async Task ThrowWritingResponse()
[Fact]
public async Task CompilationsDisallowed()
{
var hitCompliation = false;
var hitCompilation = false;
var compilerServerHost = new TestableCompilerServerHost(delegate
{
hitCompliation = true;
hitCompilation = true;
Assert.True(false, "Should not reach compilation when compilations are disallowed");
throw new Exception("");
});
......@@ -109,7 +109,7 @@ public async Task CompilationsDisallowed()
Assert.Equal(CompletionData.RequestCompleted, completionData);
Assert.True(response is RejectedBuildResponse);
Assert.False(hitCompliation);
Assert.False(hitCompilation);
}
/// <summary>
......@@ -172,7 +172,7 @@ public async Task ClientDisconnectDuringBuild()
var clientConnectionHandler = new ClientConnectionHandler(compilerServerHost);
var task = clientConnectionHandler.ProcessAsync(Task.FromResult<IClientConnection>(clientConnection));
// Don't trigger the disconnect until we confirm that the client has issueed a
// Don't trigger the disconnect until we confirm that the client has issued a
// build request.
buildStartedMre.WaitOne();
disconnectTaskCompletionSource.TrySetResult(null);
......
......@@ -195,7 +195,7 @@ public async Task ShutdownDoesNotAbortCompilation()
await serverData.SendShutdownAsync().ConfigureAwait(false);
Assert.False(compileTask.IsCompleted);
// Now complete the compilation and verify that it actually ran to completion dispite
// Now complete the compilation and verify that it actually ran to completion despite
// there being a shutdown request.
finishedMre.Set();
var response = await compileTask.ConfigureAwait(false);
......@@ -234,7 +234,7 @@ public async Task ShutdownRepeated()
await serverData.SendShutdownAsync().ConfigureAwait(false);
await serverData.SendShutdownAsync().ConfigureAwait(false);
// Now complete the compilation and verify that it actually ran to completion dispite
// Now complete the compilation and verify that it actually ran to completion despite
// there being a shutdown request.
finishedMre.Set();
var response = await compileTask.ConfigureAwait(false);
......@@ -249,7 +249,7 @@ public async Task ShutdownRepeated()
public class KeepAliveTests : VBCSCompilerServerTests
{
/// <summary>
/// Ensure server hits keep alive when processing no conections
/// Ensure server hits keep alive when processing no connections
/// </summary>
[Fact]
public async Task NoConnections()
......@@ -298,7 +298,7 @@ public async Task SimpleCases(int connectionCount)
[ConditionalTheory(typeof(WindowsOnly), Reason = "https://github.com/dotnet/roslyn/issues/46447")]
[InlineData(2)]
[InlineData(3)]
public async Task SimultaneousConnectons(int connectionCount)
public async Task SimultaneousConnections(int connectionCount)
{
using var readyMre = new ManualResetEvent(initialState: false);
var compilerServerHost = new TestableCompilerServerHost((request, cancellationToken) =>
......
......@@ -901,7 +901,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Select Case errorInfo.Code
Case ERRID.ERR_UnsupportedType1
errorInfo = If(GetSymbolSpecificUnsupprtedMetadataUseSiteErrorInfo(), errorInfo)
errorInfo = If(GetSymbolSpecificUnsupportedMetadataUseSiteErrorInfo(), errorInfo)
Case Else
' Nothing to do, simply use the same error info.
......@@ -911,7 +911,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Return errorInfo
End Function
Private Function GetSymbolSpecificUnsupprtedMetadataUseSiteErrorInfo() As DiagnosticInfo
Private Function GetSymbolSpecificUnsupportedMetadataUseSiteErrorInfo() As DiagnosticInfo
Select Case Me.Kind
Case SymbolKind.Field
Return ErrorFactory.ErrorInfo(ERRID.ERR_UnsupportedField1, CustomSymbolDisplayFormatter.ShortErrorName(Me))
......@@ -1004,7 +1004,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
If modifier.IsOptional Then
errorInfo = DeriveUseSiteErrorInfoFromType(DirectCast(modifier.Modifier, TypeSymbol))
Else
errorInfo = If(GetSymbolSpecificUnsupprtedMetadataUseSiteErrorInfo(), ErrorFactory.ErrorInfo(ERRID.ERR_UnsupportedType1, String.Empty))
errorInfo = If(GetSymbolSpecificUnsupportedMetadataUseSiteErrorInfo(), ErrorFactory.ErrorInfo(ERRID.ERR_UnsupportedType1, String.Empty))
End If
If errorInfo IsNot Nothing Then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册