24 references to HasIdentityConversion
Microsoft.CodeAnalysis.CSharp (24)
Binder\Binder_Operators.cs (4)
3614if (Conversions.HasIdentityConversion(operandType.GetNullableUnderlyingType(), targetType)) 4348if (!Conversions.HasIdentityConversion(trueType, falseType)) 4363Debug.Assert(Conversions.HasIdentityConversion(trueType, type)); 4364Debug.Assert(Conversions.HasIdentityConversion(falseType, type));
Binder\Semantics\Conversions\ConversionsBase.cs (1)
3427&& HasIdentityConversion(sourceType.Type, destinationType.Type);
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (5)
443if (!(useIdentityConversion ? Conversions.HasIdentityConversion(leftType, rightType) : leftType.Equals(rightType))) 667if ((object)rightType != null && ((object)leftType == null || !(useIdentityConversion ? Conversions.HasIdentityConversion(rightType, leftType) : rightType.Equals(leftType)))) 694if ((object)rightType != null && ((object)leftType == null || !Conversions.HasIdentityConversion(rightType, leftType))) 1228if (Conversions.HasIdentityConversion(op1.LeftType, op2.LeftType) && 1229Conversions.HasIdentityConversion(op1.RightType, op2.RightType))
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
201if (Conversions.HasIdentityConversion(op1.OperandType, op2.OperandType))
Binder\Semantics\OverloadResolution\OverloadResolution.cs (11)
2536if (!Conversions.HasIdentityConversion(t1, t2)) 2884if (Conversions.HasIdentityConversion(t1, t2)) 3065if (!Conversions.HasIdentityConversion(elementType1, elementType2)) 3134Debug.Assert(!Conversions.HasIdentityConversion(t1, t2)); 3210if ((object)node.Type != null && Conversions.HasIdentityConversion(node.Type, t)) 3240if (x.HasType && Conversions.HasIdentityConversion(x.Type, y)) 3430if (Conversions.HasIdentityConversion(type1, type2)) 3628Debug.Assert(!Conversions.HasIdentityConversion(r1, r2)); 3648if (Conversions.HasIdentityConversion(r1, r2)) 3702if (!Conversions.HasIdentityConversion(param1.Type, param2.Type)) 4604if ((object)argType != null && Conversions.HasIdentityConversion(argType, parameterType))
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
223ConversionsBase.HasIdentityConversion(builder.Parameters[0].Type, spreadType) &&
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1879Conversions.HasIdentityConversion(((NamedTypeSymbol)returnTypeOriginalDefinition).Construct(ImmutableArray.Create(elementType)), returnType))