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