提交 d79d1e29 编写于 作者: V VSadov

Rename a helper

上级 350e3b16
......@@ -357,7 +357,7 @@ private BoundExpression CreateTupleLiteralConversion(CSharpSyntaxNode syntax, Bo
var arguments = sourceTuple.Arguments;
var convertedArguments = ArrayBuilder<BoundExpression>.GetInstance(arguments.Length);
ImmutableArray<TypeSymbol> targetElementTypes = targetType.GetElementTypesIfTupleOrCompatible();
ImmutableArray<TypeSymbol> targetElementTypes = targetType.GetElementTypesOfTupleOrCompatible();
Debug.Assert(targetElementTypes.Length == arguments.Length, "converting a tuple literal to incompatible type?");
for (int i = 0; i < arguments.Length; i++)
......
......@@ -707,7 +707,7 @@ protected override bool HasImplicitTupleLiteralConversion(BoundExpression source
return false;
}
ImmutableArray<TypeSymbol> targetElementTypes = destination.GetElementTypesIfTupleOrCompatible();
ImmutableArray<TypeSymbol> targetElementTypes = destination.GetElementTypesOfTupleOrCompatible();
Debug.Assert(arguments.Length == targetElementTypes.Length);
// check arguments against flattened list of target element types
......
......@@ -664,7 +664,7 @@ private void MakeExplicitParameterTypeInferences(Binder binder, BoundTupleLitera
return;
}
var destTypes = destination.GetElementTypesIfTupleOrCompatible();
var destTypes = destination.GetElementTypesOfTupleOrCompatible();
Debug.Assert(sourceArguments.Length == destTypes.Length);
// NOTE: we are losing tuple element names when recursing into argument expressions.
......@@ -835,7 +835,7 @@ private void MakeOutputTypeInferences(Binder binder, BoundTupleLiteral argument,
return;
}
var destTypes = destination.GetElementTypesIfTupleOrCompatible();
var destTypes = destination.GetElementTypesOfTupleOrCompatible();
Debug.Assert(sourceArguments.Length == destTypes.Length);
for (int i = 0; i < sourceArguments.Length; i++)
......
......@@ -1952,7 +1952,7 @@ private bool ExpressionMatchExactly(BoundTupleLiteral tupleSource, TypeSymbol ta
return false;
}
var destTypes = destination.GetElementTypesIfTupleOrCompatible();
var destTypes = destination.GetElementTypesOfTupleOrCompatible();
Debug.Assert(sourceArguments.Length == destTypes.Length);
for (int i = 0; i < sourceArguments.Length; i++)
......
......@@ -636,7 +636,7 @@ private BoundExpression MakeImplicitConversion(BoundExpression rewrittenOperand,
bool explicitCastInCode,
NamedTypeSymbol rewrittenType)
{
var destElementTypes = rewrittenType.GetElementTypesIfTupleOrCompatible();
var destElementTypes = rewrittenType.GetElementTypesOfTupleOrCompatible();
var numElements = destElementTypes.Length;
ImmutableArray<FieldSymbol> srcElementFields;
......
......@@ -392,7 +392,7 @@ public static bool TryGetElementTypesIfTupleOrCompatible(this TypeSymbol type, o
return true;
}
public static ImmutableArray<TypeSymbol> GetElementTypesIfTupleOrCompatible(this TypeSymbol type)
public static ImmutableArray<TypeSymbol> GetElementTypesOfTupleOrCompatible(this TypeSymbol type)
{
if (type.IsTupleType)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册