From 1f4f6b141dee8e3b3ab5eff9f5c2048fbb55387d Mon Sep 17 00:00:00 2001 From: Charles Stoner Date: Thu, 19 Mar 2015 09:11:22 -0700 Subject: [PATCH] Correct typos --- src/Compilers/CSharp/Portable/BoundTree/BoundNode.cs | 7 ++----- src/Compilers/CSharp/Portable/Symbols/AssemblySymbol.cs | 2 +- .../Core/Portable/Compilation/OptimizationLevel.cs | 2 +- .../Core/Portable/MetadataReference/MetadataReference.cs | 2 +- .../ReferenceManager/CommonReferenceManager.Resolution.cs | 2 +- src/Scripting/Core/ObjectFormatter.Formatter.cs | 2 +- src/Scripting/Core/ScriptBuilder.cs | 3 +-- .../Portable/Shared/Utilities/CommonFormattingHelpers.cs | 2 +- 8 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/Compilers/CSharp/Portable/BoundTree/BoundNode.cs b/src/Compilers/CSharp/Portable/BoundTree/BoundNode.cs index c59539036f8..05ba6eaebb5 100644 --- a/src/Compilers/CSharp/Portable/BoundTree/BoundNode.cs +++ b/src/Compilers/CSharp/Portable/BoundTree/BoundNode.cs @@ -2,10 +2,7 @@ using System; using System.Diagnostics; -using System.Linq; using Microsoft.CodeAnalysis.CSharp.Symbols; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Text; namespace Microsoft.CodeAnalysis.CSharp { @@ -48,11 +45,11 @@ protected BoundNode(BoundKind kind, CSharpSyntaxNode syntax) } /// - /// Determines if a bound node, or associated syntax or type has an error (not a waring) + /// Determines if a bound node, or associated syntax or type has an error (not a warning) /// diagnostic associated with it. /// /// Typically used in the binder as a way to prevent cascading errors. - /// In most other cases a more lightweigth HasErrors should be used. + /// In most other cases a more lightweight HasErrors should be used. /// public bool HasAnyErrors { diff --git a/src/Compilers/CSharp/Portable/Symbols/AssemblySymbol.cs b/src/Compilers/CSharp/Portable/Symbols/AssemblySymbol.cs index fe56361c3d5..dd8743bea0a 100644 --- a/src/Compilers/CSharp/Portable/Symbols/AssemblySymbol.cs +++ b/src/Compilers/CSharp/Portable/Symbols/AssemblySymbol.cs @@ -579,7 +579,7 @@ internal TypeSymbol GetTypeByReflectionType(Type type, bool includeReferences) Debug.Assert(!typeInfo.IsByRef); - // not supported rigth now (we don't accept open types as submission results nor host types): + // not supported (we don't accept open types as submission results nor host types): Debug.Assert(!typeInfo.ContainsGenericParameters); if (typeInfo.IsArray) diff --git a/src/Compilers/Core/Portable/Compilation/OptimizationLevel.cs b/src/Compilers/Core/Portable/Compilation/OptimizationLevel.cs index fb8131437eb..668d0b5ae12 100644 --- a/src/Compilers/Core/Portable/Compilation/OptimizationLevel.cs +++ b/src/Compilers/Core/Portable/Compilation/OptimizationLevel.cs @@ -34,7 +34,7 @@ public enum OptimizationLevel /// JIT optimizations are enabled via assembly level attribute (). /// Edit and Continue is disabled. /// Sequence points may be optimized away. As a result it might not be possible to place or hit a breakpoint. - /// User-defined locals migth be optimized away. They might not be available while debugging. + /// User-defined locals might be optimized away. They might not be available while debugging. /// /// /// Corresponds to command line argument /optimize+. diff --git a/src/Compilers/Core/Portable/MetadataReference/MetadataReference.cs b/src/Compilers/Core/Portable/MetadataReference/MetadataReference.cs index 01c5f6aff63..c3c78057fcb 100644 --- a/src/Compilers/Core/Portable/MetadataReference/MetadataReference.cs +++ b/src/Compilers/Core/Portable/MetadataReference/MetadataReference.cs @@ -297,7 +297,7 @@ public static MetadataReference CreateFromAssembly(Assembly assembly) Stream peStream = FileStreamLightUp.OpenFileStream(location); // The file is locked by the CLR assembly loader, so we can create a lazily read metadata, - // which migth also lock the file until the reference is GC'd. + // which might also lock the file until the reference is GC'd. var metadata = AssemblyMetadata.CreateFromStream(peStream); return metadata.GetReference(filePath: location); diff --git a/src/Compilers/Core/Portable/ReferenceManager/CommonReferenceManager.Resolution.cs b/src/Compilers/Core/Portable/ReferenceManager/CommonReferenceManager.Resolution.cs index d89322deee5..8460400d64d 100644 --- a/src/Compilers/Core/Portable/ReferenceManager/CommonReferenceManager.Resolution.cs +++ b/src/Compilers/Core/Portable/ReferenceManager/CommonReferenceManager.Resolution.cs @@ -616,7 +616,7 @@ private static void AddModule(PEModule module, int referenceIndex, ResolvedRefer { Debug.Assert(equivalent.Identity.IsStrongName); - // versions migth have been unified for a Framework assembly: + // versions might have been unified for a Framework assembly: if (identity != equivalent.Identity) { // Dev12 C# reports an error diff --git a/src/Scripting/Core/ObjectFormatter.Formatter.cs b/src/Scripting/Core/ObjectFormatter.Formatter.cs index 07eb8dbf2ad..1bae28f6830 100644 --- a/src/Scripting/Core/ObjectFormatter.Formatter.cs +++ b/src/Scripting/Core/ObjectFormatter.Formatter.cs @@ -744,7 +744,7 @@ private void ObjectToString(Builder result, object obj) /// The attribute doesn't specify what language (VB, C#, F#, etc.) to use to parse these expressions. Even if it did all languages /// would need to be able to evaluate each other language's expressions, which is not viable and the Expression Evaluator doesn't /// work that way today. Instead it evaluates the embedded expressions in the language of the current method frame. When consuming - /// VB objects from C#, for example, the evaluation migth fail due to language mismatch (evaluating VB expression using C# parser). + /// VB objects from C#, for example, the evaluation might fail due to language mismatch (evaluating VB expression using C# parser). /// /// Therefore we limit the expressions to a simple language independent syntax: {clr-member-name} '(' ')' ',nq', /// where parentheses and ,nq suffix (no-quotes) are optional and the name is an arbitrary CLR field, property, or method name. diff --git a/src/Scripting/Core/ScriptBuilder.cs b/src/Scripting/Core/ScriptBuilder.cs index b1adc4e11c8..8c72da972e8 100644 --- a/src/Scripting/Core/ScriptBuilder.cs +++ b/src/Scripting/Core/ScriptBuilder.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; -using System.Collections.Immutable; using System.Diagnostics; using System.Reflection; using System.Reflection.Emit; @@ -27,7 +26,7 @@ internal class ScriptBuilder /// identity into the same load context. /// /// We are using a certain naming scheme for the generated assemblies (a fixed name prefix followed by a number). - /// If we allowed the compiled code to add references that match this exact pattern it migth happen that + /// If we allowed the compiled code to add references that match this exact pattern it might happen that /// the user supplied reference identity conflicts with the identity we use for our generated assemblies and /// the AppDomain assembly resolve event won't be able to correctly identify the target assembly. /// diff --git a/src/Workspaces/Core/Portable/Shared/Utilities/CommonFormattingHelpers.cs b/src/Workspaces/Core/Portable/Shared/Utilities/CommonFormattingHelpers.cs index cd6ca2f63b1..6e1835ada14 100644 --- a/src/Workspaces/Core/Portable/Shared/Utilities/CommonFormattingHelpers.cs +++ b/src/Workspaces/Core/Portable/Shared/Utilities/CommonFormattingHelpers.cs @@ -259,7 +259,7 @@ private static void AppendTrailingTriviaText(SyntaxToken token, StringBuilder bu public static TextSpan GetSpanIncludingTrailingAndLeadingTriviaOfAdjacentTokens(SyntaxToken startToken, SyntaxToken endToken) { // most of cases we can just ask previous and next token to create the span, but in some corner cases such as omitted token case, - // those navigation function doesn't work, so we have to explore the tree ourselves to create rigth span + // those navigation function doesn't work, so we have to explore the tree ourselves to create correct span var startPosition = GetStartPositionOfSpan(startToken); var endPosition = GetEndPositionOfSpan(endToken); -- GitLab