Skip to content

Commit

Permalink
Merge pull request #3577 from bkoelman/spelling-fixes
Browse files Browse the repository at this point in the history
Corrected misspellings in code comments
  • Loading branch information
VSadov committed Jun 22, 2015
2 parents 1dba117 + dcd3544 commit 2f2629b
Show file tree
Hide file tree
Showing 103 changed files with 189 additions and 189 deletions.
6 changes: 3 additions & 3 deletions src/Compilers/CSharp/Portable/Binder/Binder_Conversions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,9 @@ private bool MemberGroupFinalValidation(BoundExpression receiverOpt, MethodSymbo
///
/// Spec 7.5.4: Compile-time checking of dynamic overload resolution
/// If F is a static method, the method group must have resulted from a simple-name, a member-access through a type,
/// or a member-access whose receiver cant be classified as a type or value until after overload resolution (see §7.6.4.1).
/// or a member-access whose receiver can't be classified as a type or value until after overload resolution (see §7.6.4.1).
/// If F is an instance method, the method group must have resulted from a simple-name, a member-access through a variable or value,
/// or a member-access whose receiver cant be classified as a type or value until after overload resolution (see §7.6.4.1).
/// or a member-access whose receiver can't be classified as a type or value until after overload resolution (see §7.6.4.1).
/// </summary>
/// <returns>
/// True if there is any error.
Expand All @@ -433,7 +433,7 @@ private bool MemberGroupFinalValidationAccessibilityChecks(BoundExpression recei
if (receiverOpt != null && receiverOpt.Kind == BoundKind.TypeOrValueExpression)
{
// TypeOrValue expression isn't replaced only if the invocation is late bound, in which case it can't be extension method.
// None of the checks below apply if the receiver cant be classified as a type or value.
// None of the checks below apply if the receiver can't be classified as a type or value.
Debug.Assert(!invokedAsExtensionMethod);
}
else if (memberSymbol.IsStatic)
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/Binder/Binder_Operators.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private BoundExpression BindCompoundAssignment(AssignmentExpressionSyntax node,
case BinaryOperatorKind.Subtraction:
return BindEventAssignment(node, (BoundEventAccess)left, right, kindOperator, diagnostics);

// fallthrough for other operators, if RHS is dynamic we produce dynamic operation, otherwise we'll report an error ...
// fall-through for other operators, if RHS is dynamic we produce dynamic operation, otherwise we'll report an error ...
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1419,8 +1419,8 @@ private BetterResult BetterFunctionMember<TMember>(

// Otherwise, if MP has more specific parameter types than MQ, then MP is better than
// MQ. Let {R1, R2, …, RN} and {S1, S2, …, SN} represent the uninstantiated and
// unexpanded parameter types of MP and MQ. MPs parameter types are more specific than
// MQs if, for each parameter, RX is not less specific than SX, and, for at least one
// unexpanded parameter types of MP and MQ. MP's parameter types are more specific than
// MQ's if, for each parameter, RX is not less specific than SX, and, for at least one
// parameter, RX is more specific than SX

// NB: OriginalDefinition, not ConstructedFrom. Substitutions into containing symbols
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/CSharpResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/CSharpResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3561,7 +3561,7 @@ Give the compiler some way to differentiate the methods. For example, you can gi
<value>Because this call is not awaited, execution of the current method continues before the call is completed</value>
</data>
<data name="WRN_UnobservedAwaitableExpression_Description" xml:space="preserve">
<value>The current method calls an async method that returns a Task or a Task&lt;TResult&gt; and doesnt apply the await operator to the result. The call to the async method starts an asynchronous task. However, because no await operator is applied, the program continues without waiting for the task to complete. In most cases, that behavior isn't what you expect. Usually other aspects of the calling method depend on the results of the call or, minimally, the called method is expected to complete before you return from the method that contains the call.
<value>The current method calls an async method that returns a Task or a Task&lt;TResult&gt; and doesn't apply the await operator to the result. The call to the async method starts an asynchronous task. However, because no await operator is applied, the program continues without waiting for the task to complete. In most cases, that behavior isn't what you expect. Usually other aspects of the calling method depend on the results of the call or, minimally, the called method is expected to complete before you return from the method that contains the call.

An equally important issue is what happens to exceptions that are raised in the called async method. An exception that's raised in a method that returns a Task or Task&lt;TResult&gt; is stored in the returned task. If you don't await the task or explicitly check for exceptions, the exception is lost. If you await the task, its exception is rethrown.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Microsoft.CodeAnalysis.CSharp.Symbols
/// name, the number of type parameters and the number, modifiers, and types of its formal
/// parameters. For these purposes, any type parameter of the method that occurs in the type of
/// a formal parameter is identified not by its name, but by its ordinal position in the type
/// argument list of the method. The return type is not part of a methods signature, nor are
/// argument list of the method. The return type is not part of a method's signature, nor are
/// the names of the type parameters or the formal parameters.
/// </para>
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ namespace Microsoft.CodeAnalysis.CSharp.Symbols.Metadata.PE
/// Comments from the C# design document for Dynamic:
/// SPEC: To represent the dynamic type in metadata, any indexer, field or return value typed as dynamic or known to be a constructed type
/// SPEC: containing dynamic will have each occurrence of dynamic erased to object and will be annotated with a [DynamicAttribute].
/// SPEC: If the relevant type is a constructed type, the attributes constructor is passed a bool array.
/// SPEC: This array represents a preorder traversal of each node in the constructed type’s “tree of types,
/// SPEC: with true set for each node that is dynamic, and false set for all other types.
/// SPEC: If the relevant type is a constructed type, the attribute's constructor is passed a bool array.
/// SPEC: This array represents a preorder traversal of each "node" in the constructed type's "tree of types",
/// SPEC: with true set for each "node" that is dynamic, and false set for all other types.
/// SPEC: When dynamic occurs as part of the base type of a type, the applicable [DynamicAttribute] is applied to the type itself.
/// </remarks>
internal struct DynamicTypeDecoder
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/Symbols/MethodSymbol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ public virtual bool IsGenericMethod

/// <summary>
/// Returns whether this method is using CLI VARARG calling convention. This is used for C-style variable
/// argument lists. This is used extremely rarely in C# code and is represented using the undocumented __arglist keyword.
/// argument lists. This is used extremely rarely in C# code and is represented using the undocumented "__arglist" keyword.
///
/// Note that methods with params on the last parameter are indicated with the IsParams property on ParameterSymbol, and
/// Note that methods with "params" on the last parameter are indicated with the "IsParams" property on ParameterSymbol, and
/// are not represented with this property.
/// </summary>
public abstract bool IsVararg { get; }
Expand Down
6 changes: 3 additions & 3 deletions src/Compilers/CSharp/Test/Emit/BreakingChanges.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1291,15 +1291,15 @@ public void RepeatedObsoleteWarnings()
// var y = ObsoleteType.field1;
//
// then the native compiler reports ObsoleteType as obsolete only once. This is because the native compiler caches
// the lookup of typenames for certain cases and doesnt report errors on the second lookup as that just comes
// the lookup of typenames for certain cases and doesn't report errors on the second lookup as that just comes
// from the cache. Note how I said caches sometimes. If you simply say -
//
// var x= new ObsoleteType();
// var y = new ObsoleteType();
//
// Then the native compiler reports the error twice. I dont think we should replicate this in Roslyn. Note however
// Then the native compiler reports the error twice. I don't think we should replicate this in Roslyn. Note however
// that this is a breaking change because if the first line had been #pragma disabled, then the code would compile
// without warnings in Dev11 but we will report warnings. I think its a corner enough scenario and the native
// without warnings in Dev11 but we will report warnings. I think it's a corner enough scenario and the native
// behavior is quirky enough to warrant a break.
// </quote>
CompileAndVerify(@"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ public void TestExplicitImplementationInBaseGenericType()
// Tests:
// Implement I<string> explicitly in base class and I<int> explicitly in derived class –
// assuming I<string> and I<int> have members with same signature (i.e. members
// that dont depend on generic-ness of the interface) test which (base / derived class)
// that don't depend on generic-ness of the interface) test which (base / derived class)
// members are invoked when calling through each interface

var source = @"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ public void TestImplicitImplementationInBaseGenericType2()
// Tests:
// Implement I<string> implicitly in base class and I<int> implicitly in derived class –
// assuming I<string> and I<int> have members with same signature (i.e. members
// that dont depend on generic-ness of the interface) test which (base / derived class)
// that don't depend on generic-ness of the interface) test which (base / derived class)
// members are invoked when calling through each interface

var source = @"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,7 @@ private void TestOverrideHidingMember()
{
// Tests:
// Hide base virtual member with a virtual new / abstract new member
// Test that we dont override the hidden base member on further derived classes
// Test that we don't override the hidden base member on further derived classes

var source = @"
using System;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.CodeAnalysis.CSharp.UnitTests.CodeGen
{
public class CompoundAssignmentForDelegate : EmitMetadataTestBase
{
// The method to removal or concatenation with optional parameter
// The method to removal or concatenation with 'optional' parameter
[Fact]
public void OptionalParaInCompAssignOperator()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Test/Emit/CodeGen/ForeachTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ .locals init (string V_0,
CompileAndVerify(text).VerifyIL("Test.Main", expectedIL);
}

// Traversing items in Dictionary
// Traversing items in 'Dictionary'
[Fact]
public void TestDictionary()
{
Expand Down Expand Up @@ -590,7 +590,7 @@ static public void Main(string[] args)
CompileAndVerify(text, expectedOutput: expectedOutput);
}

// Return in foreach
// 'Return' in foreach
[Fact]
public void TestReturn()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ public static void F(int z)
[Fact]
public void Test2()
{
//x is assigned when true after false
//Therefore x is assigned before z == 1 (5.3.3.24)
//Therefore x is assigned after z == 1 (5.3.3.20)
//Therefore x is assigned when true after (false && z == 1) (5.3.3.24)
//x is "assigned when true" after "false"
//Therefore x is "assigned" before "z == 1" (5.3.3.24)
//Therefore x is "assigned" after "z == 1" (5.3.3.20)
//Therefore x is "assigned when true" after "(false && z == 1)" (5.3.3.24)
//Since the condition of the ?: expression is the constant true, the state of x after the ?: expression is the same as the state of x after the consequence (5.3.3.28)
//Since the state of x after the consequence is assigned when true, the state of x after the ?: expression is assigned when true (5.3.3.28)
//Since the state of x after the ifs condition is assigned when true, x is assigned in the then block (5.3.3.5)
//Since the state of x after the consequence is "assigned when true", the state of x after the ?: expression is "assigned when true" (5.3.3.28)
//Since the state of x after the if's condition is "assigned when true", x is assigned in the then block (5.3.3.5)
//Therefore, there should be no error.
string program = @"
namespace ConsoleApplication1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ public void LazyBoundUsings1()
var text =
@"
// Peter Golde[7/19/2010]: I managed to construct the following interesting example today,
// which Dev10 does compile. Interestingly, the resolution of one using can depend
// on the resolution of another using later in the same namespace.
// which Dev10 does compile. Interestingly, the resolution of one ""using"" can depend
// on the resolution of another ""using"" later in the same namespace.
using K = A.Q;
using L = B.R;

Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Test/Symbol/Symbols/Source/EnumTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public void OutOfUnderlyingRange()
var text =
@"public enum Suits : byte
{
ValueA = ""3"", // Cant implicitly convert
ValueB = 2.2, // Cant implicitly convert
ValueA = ""3"", // Can't implicitly convert
ValueB = 2.2, // Can't implicitly convert
ValueC = 257 // Out of underlying range
};
";
Expand Down Expand Up @@ -654,7 +654,7 @@ public enum COLORS : uint { RED, GREEN, BLUE };
}

[WorkItem(539178, "DevDiv")]
// No underlying type after ‘:’
// No underlying type after ':'
[Fact]
public void CS3031ERR_TypeExpected_NoUnderlyingTypeForEnum()
{
Expand Down Expand Up @@ -688,7 +688,7 @@ enum Figure : C { One, Two, Three }
VerifyEnumsValue(comp, "Figure", SpecialType.System_Int32, 0, 1, 2);
}

// partial as Enum name
// 'partial' as Enum name
[Fact]
public void partialAsEnumName()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ public C()
}

}").VerifyDiagnostics(
// (12,25): error CS8080: Auto-implemented properties must override all accessors of the overridden property.
// (12,25): error CS8080: "Auto-implemented properties must override all accessors of the overridden property."
// public override int P { get; }
Diagnostic(ErrorCode.ERR_AutoPropertyMustOverrideSet, "P").WithArguments("C.P").WithLocation(12, 25),
// (13,25): error CS8080: Auto-implemented properties must override all accessors of the overridden property.
// (13,25): error CS8080: "Auto-implemented properties must override all accessors of the overridden property."
// public override int P1 { get; }
Diagnostic(ErrorCode.ERR_AutoPropertyMustOverrideSet, "P1").WithArguments("C.P1").WithLocation(13, 25)

Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/Core/CodeAnalysisTest/AsyncQueueTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public async Task TaskCompletesAsyncWithComplete()
await queue.WhenCompletedTask.ConfigureAwait(false);

// The AsyncQueue<T>.Task property won't complete until all of the
// exitsing DequeueAsync values have also completed.
// existing DequeueAsync values have also completed.
Assert.True(task.IsCompleted);
}

Expand Down
6 changes: 3 additions & 3 deletions src/Compilers/Core/CodeAnalysisTest/Text/TextSpanTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void TextSpanContains01()
TextSpan span_10_11 = new TextSpan(10, 1);
TextSpan span_00_03 = new TextSpan(0, 3);

// nonoverlapping
// non-overlapping
Assert.False(span_05_15.Contains(span_00_03));
Assert.False(span_00_03.Contains(span_05_15));

Expand All @@ -157,7 +157,7 @@ public void TextSpanContains01()
[Fact]
public void TextSpanContainsEmpty()
{
// nonoverlapping
// non-overlapping
Assert.False(new TextSpan(2, 5).Contains(new TextSpan(0, 0)));
Assert.False(new TextSpan(2, 5).Contains(new TextSpan(10, 0)));

Expand All @@ -177,7 +177,7 @@ public void TextSpanContainsEmpty()
[Fact]
public void TextSpanEmptyContains()
{
// nonoverlapping
// non-overlapping
Assert.False(new TextSpan(0, 0).Contains(new TextSpan(2, 5)));
Assert.False(new TextSpan(10, 0).Contains(new TextSpan(2, 5)));

Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/Core/CodeAnalysisTest/VersionHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void ParseGood()
Assert.True(VersionHelper.TryParseAssemblyVersion("3.2.*", allowWildcard: true, version: out version));
Assert.Equal(3, version.Major);
Assert.Equal(2, version.Minor);
//number of days since jan 1, 2000
//number of days since Jan 1, 2000
Assert.Equal((int)(DateTime.Now - new DateTime(2000, 1, 1)).TotalDays, version.Build);
//number of seconds since midnight divided by two
int s = (int)DateTime.Now.TimeOfDay.TotalSeconds / 2;
Expand Down
Loading

0 comments on commit 2f2629b

Please sign in to comment.