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