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)
2544if (!Conversions.HasIdentityConversion(t1, t2)) 2892if (Conversions.HasIdentityConversion(t1, t2)) 3086if (!Conversions.HasIdentityConversion(elementType1, elementType2)) 3155Debug.Assert(!Conversions.HasIdentityConversion(t1, t2)); 3231if ((object)node.Type != null && Conversions.HasIdentityConversion(node.Type, t)) 3261if (x.HasType && Conversions.HasIdentityConversion(x.Type, y)) 3451if (Conversions.HasIdentityConversion(type1, type2)) 3649Debug.Assert(!Conversions.HasIdentityConversion(r1, r2)); 3669if (Conversions.HasIdentityConversion(r1, r2)) 3723if (!Conversions.HasIdentityConversion(param1.Type, param2.Type)) 4625if ((object)argType != null && Conversions.HasIdentityConversion(argType, parameterType))
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
226ConversionsBase.HasIdentityConversion(builder.Parameters[0].Type, spreadType) &&
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1879Conversions.HasIdentityConversion(((NamedTypeSymbol)returnTypeOriginalDefinition).Construct(ImmutableArray.Create(elementType)), returnType))