Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usages of 'Foo' from our codebase. #21224

Merged
merged 4 commits into from
Aug 1, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/Binder/Binder_Attributes.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
Expand All @@ -22,7 +22,7 @@ internal partial class Binder
// For example, if were binding attributes on delegate type symbol for below code snippet:
// [A1]
// [return: A2]
// public delegate void Foo();
// public delegate void Goo();
// attributesToBind will only contain first attribute syntax.
internal static void BindAttributeTypes(ImmutableArray<Binder> binders, ImmutableArray<AttributeSyntax> attributesToBind, Symbol ownerSymbol, NamedTypeSymbol[] boundAttributeTypes, DiagnosticBag diagnostics)
{
Expand Down Expand Up @@ -521,9 +521,9 @@ protected virtual MethodSymbol BindAttributeConstructor(
/// if named constructor arguments are used.
///
/// For example:
/// void Foo(int x, int y, int z, int w = 3);
/// void Goo(int x, int y, int z, int w = 3);
///
/// Foo(0, z: 2, y: 1);
/// Goo(0, z: 2, y: 1);
///
/// Arguments returned: 0, 1, 2, 3
/// </summary>
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/Binder/Binder_Crefs.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Collections.Immutable;
Expand Down Expand Up @@ -358,11 +358,11 @@ private ImmutableArray<Symbol> ComputeSortedCrefMembers(NamespaceOrTypeSymbol co
// to not introduce a regression and breaking change we return NULL in this case.
// e.g.
//
// /// <see cref="Foo"/>
// class Foo<T> { }
// /// <see cref="Goo"/>
// class Goo<T> { }
//
// This cref used not to bind to anything, because before it was looking for a type and
// since there was no arity, it didn't find Foo<T>. Now however, it finds Foo<T>.ctor,
// since there was no arity, it didn't find Goo<T>. Now however, it finds Goo<T>.ctor,
// which is arguably correct, but would be a breaking change (albeit with minimal impact)
// so we catch this case and chuck out the symbol found.

Expand Down
6 changes: 3 additions & 3 deletions src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.CodeAnalysis.Collections;
using Microsoft.CodeAnalysis.CSharp.Symbols;
Expand Down Expand Up @@ -5198,8 +5198,8 @@ private BoundExpression BindMemberAccessWithBoundLeft(
{
// There are some sources of a `dynamic` typed value that can be known before runtime
// to be invalid. For example, accessing a set-only property whose type is dynamic:
// dynamic Foo { set; }
// If Foo itself is a dynamic thing (e.g. in `x.Foo.Bar`, `x` is dynamic, and we're
// dynamic Goo { set; }
// If Goo itself is a dynamic thing (e.g. in `x.Goo.Bar`, `x` is dynamic, and we're
// currently checking Bar), then CheckValue will do nothing.
boundLeft = CheckValue(boundLeft, BindValueKind.RValue, diagnostics);
return BindDynamicMemberAccess(node, boundLeft, right, invoked, indexed, diagnostics);
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/Binder/Binder_Invocation.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -579,7 +579,7 @@ private BoundExpression BindMethodGroupInvocation(
{
if (HasApplicableConditionalMethod(resolution.OverloadResolutionResult))
{
// warning CS1974: The dynamically dispatched call to method 'Foo' may fail at runtime
// warning CS1974: The dynamically dispatched call to method 'Goo' may fail at runtime
// because one or more applicable overloads are conditional methods
Error(diagnostics, ErrorCode.WRN_DynamicDispatchToConditionalMethod, syntax, methodGroup.Name);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Compilers/CSharp/Portable/Binder/Binder_Statements.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Collections.Immutable;
Expand Down Expand Up @@ -2527,8 +2527,8 @@ internal void GenerateAnonymousFunctionConversionError(DiagnosticBag diagnostics
// It is possible that the conversion from lambda to delegate is just fine, and
// that we ended up here because the target type, though itself is not an error
// type, contains a type argument which is an error type. For example, converting
// (Foo foo)=>{} to Action<Foo> is a perfectly legal conversion even if Foo is undefined!
// In that case we have already reported an error that Foo is undefined, so just bail out.
// (Goo goo)=>{} to Action<Goo> is a perfectly legal conversion even if Goo is undefined!
// In that case we have already reported an error that Goo is undefined, so just bail out.

if (reason == LambdaConversionResult.Success)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/Binder/Binder_Symbols.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -599,7 +599,7 @@ protected Symbol BindNonGenericSimpleNamespaceOrTypeOrAliasSymbol(
{
var identifierValueText = node.Identifier.ValueText;

// If we are here in an error-recovery scenario, say, "foo<int, >(123);" then
// If we are here in an error-recovery scenario, say, "goo<int, >(123);" then
// we might have an 'empty' simple name. In that case do not report an
// 'unable to find ""' error; we've already reported an error in the parser so
// just bail out with an error symbol.
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Portable/Binder/Imports.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -98,9 +98,9 @@ public static Imports FromSyntax(

// define all of the extern aliases first. They may used by the target of a using

// using Bar=Foo::Bar;
// using Foo::Baz;
// extern alias Foo;
// using Bar=Goo::Bar;
// using Goo::Baz;
// extern alias Goo;

var diagnostics = new DiagnosticBag();

Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/Binder/LookupResult.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Diagnostics;
using Microsoft.CodeAnalysis.CSharp.Symbols;
Expand Down Expand Up @@ -35,7 +35,7 @@ namespace Microsoft.CodeAnalysis.CSharp
///
/// var result = LookupResult.GetInstance();
///
/// scope.Lookup(result, "foo");
/// scope.Lookup(result, "goo");
/// ... use result ...
///
/// result.Clear();
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/Binder/LookupResultKind.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Diagnostics;
using Microsoft.CodeAnalysis.CSharp.Symbols;
Expand Down Expand Up @@ -41,7 +41,7 @@ internal enum LookupResultKind : byte
WrongArity,
NotCreatable, // E.g., new of an interface or static class
Inaccessible,
NotReferencable, // E.g., get_Foo binding to an accessor.
NotReferencable, // E.g., get_Goo binding to an accessor.
NotAValue,
NotAVariable, // used for several slightly different places, e.g. LHS of =, out/ref parameters, etc.
NotInvocable,
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/Binder/Semantics/AccessCheck.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Diagnostics;
Expand Down Expand Up @@ -480,7 +480,7 @@ private static bool InheritsFromIgnoringConstruction(
}

// NOTE(cyrusn): The base type of an 'original' type may not be 'original'. i.e.
// "class Foo : IBar<int>". We must map it back to the 'original' when as we walk up
// "class Goo : IBar<int>". We must map it back to the 'original' when as we walk up
// the base type hierarchy.
var next = current.GetNextBaseTypeNoUseSiteDiagnostics(basesBeingResolved, compilation, ref visited);
if ((object)next == null)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Collections.Immutable;
Expand Down Expand Up @@ -148,7 +148,7 @@ public static MethodTypeInferenceResult Infer(
// void M<U>(T t, U u);
// }
// ...
// static void Foo<V>(V v, I<V> iv)
// static void Goo<V>(V v, I<V> iv)
// {
// iv.M(v, "");
// }
Expand Down Expand Up @@ -546,7 +546,7 @@ private void MakeExplicitParameterTypeInferences(Binder binder, BoundExpression
// that has no name text. This is because of the following scenario:
//
// void M<T>(T t) { }
// void Foo()
// void Goo()
// {
// UnknownType t;
// M(t);
Expand Down Expand Up @@ -2713,17 +2713,17 @@ private static NamedTypeSymbol GetInterfaceInferenceBound(ImmutableArray<NamedTy
// In error recovery and reporting scenarios we sometimes end up in a situation
// like this:
//
// x.Foo( y=>
// x.Goo( y=>
//
// and the question is, "is Foo a valid extension method of x?" If Foo is
// generic, then Foo will be something like:
// and the question is, "is Goo a valid extension method of x?" If Goo is
// generic, then Goo will be something like:
//
// static Blah Foo<T>(this Bar<T> bar, Func<T, T> f){ ... }
// static Blah Goo<T>(this Bar<T> bar, Func<T, T> f){ ... }
//
// What we would like to know is: given _only_ the expression x, can we infer
// what T is in Bar<T> ? If we can, then for error recovery and reporting
// we can provisionally consider Foo to be an extension method of x. If we
// cannot deduce this just from x then we should consider Foo to not be an
// we can provisionally consider Goo to be an extension method of x. If we
// cannot deduce this just from x then we should consider Goo to not be an
// extension method of x, at least until we have more information.
//
// Clearly it is pointless to run multiple phases
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Collections.Immutable;
Expand Down Expand Up @@ -571,8 +571,8 @@ private void AddMemberToCandidateSet<TMember>(
// If the normal form is invalid and the expanded form is valid then obviously we prefer
// the expanded form. However, there may be error-reporting situations where we
// prefer to report the error on the expanded form rather than the normal form.
// For example, if you have something like Foo<T>(params T[]) and a call
// Foo(1, "") then the error for the normal form is "too many arguments"
// For example, if you have something like Goo<T>(params T[]) and a call
// Goo(1, "") then the error for the normal form is "too many arguments"
// and the error for the expanded form is "failed to infer T". Clearly the
// expanded form error is better.
private static bool PreferExpandedFormOverNormalForm(MemberAnalysisResult normalResult, MemberAnalysisResult expandedResult)
Expand Down Expand Up @@ -904,21 +904,21 @@ private static void RemoveAllInterfaceMembers<TMember>(ArrayBuilder<MemberResolu
{
// Consider the following case:
//
// interface IFoo { string ToString(); }
// interface IGoo { string ToString(); }
// class C { public override string ToString() { whatever } }
// class D : C, IFoo
// class D : C, IGoo
// {
// public override string ToString() { whatever }
// string IFoo.ToString() { whatever }
// string IGoo.ToString() { whatever }
// }
// ...
// void M<U>(U u) where U : C, IFoo { u.ToString(); } // ???
// void M<U>(U u) where U : C, IGoo { u.ToString(); } // ???
// ...
// M(new D());
//
// What should overload resolution do on the call to u.ToString()?
//
// We will have IFoo.ToString and C.ToString (which is an override of object.ToString)
// We will have IGoo.ToString and C.ToString (which is an override of object.ToString)
// in the candidate set. Does the rule apply to eliminate all interface methods? NO. The
// rule only applies if the candidate set contains a method which originally came from a
// class type other than object. The method C.ToString is the "slot" for
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/CodeGen/EmitAddress.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Immutable;
Expand Down Expand Up @@ -221,7 +221,7 @@ private LocalDefinition EmitSequenceAddress(BoundSequence sequence, AddressKind

// when a sequence is happened to be a byref receiver
// we may need to extend the life time of the target until we are done accessing it
// {.v ; v = Foo(); v}.Bar() // v should be released only after Bar() is done.
// {.v ; v = Goo(); v}.Bar() // v should be released only after Bar() is done.
LocalSymbol doNotRelease = null;
if (tempOpt == null)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Compilers/CSharp/Portable/CodeGen/Optimizer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -28,16 +28,16 @@ internal class Optimizer
/// 1) Do not elide any user defined locals, even if never read from.
/// Example:
/// {
/// var dummy = Foo(); // should not become just "Foo"
/// var dummy = Goo(); // should not become just "Goo"
/// }
///
/// User might want to examine dummy in the debugger.
///
/// 2) Do not carry values on the stack between statements
/// Example:
/// {
/// var temp = Foo();
/// temp.ToString(); // should not become Foo().ToString();
/// var temp = Goo();
/// temp.ToString(); // should not become Goo().ToString();
/// }
///
/// User might want to examine temp in the debugger.
Expand Down Expand Up @@ -368,7 +368,7 @@ private bool Includes(int val)
// it will affect inference of stack behavior
// it will also affect when locals can be scheduled to the stack
// Example:
// Foo(x, ref x) <-- x cannot be a stack local as it is used in different contexts.
// Goo(x, ref x) <-- x cannot be a stack local as it is used in different contexts.
internal enum ExprContext
{
None,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Concurrent;
Expand Down Expand Up @@ -1002,8 +1002,8 @@ private void GetAllUnaliasedModules(ArrayBuilder<ModuleSymbol> modules)
/// Return a list of assembly symbols than can be accessed without using an alias.
/// For example:
/// 1) /r:A.dll /r:B.dll -> A, B
/// 2) /r:Foo=A.dll /r:B.dll -> B
/// 3) /r:Foo=A.dll /r:A.dll -> A
/// 2) /r:Goo=A.dll /r:B.dll -> B
/// 3) /r:Goo=A.dll /r:A.dll -> A
/// </summary>
internal void GetUnaliasedReferencedAssemblies(ArrayBuilder<AssemblySymbol> assemblies)
{
Expand Down
Loading