46 references to Identity
Microsoft.CodeAnalysis.CSharp (46)
Binder\Binder_Operators.cs (2)
3635case ConversionKind.Identity: 3879case ConversionKind.Identity:
Binder\Binder_Statements.cs (3)
1948if (conversion.Kind != ConversionKind.Identity) 2674if (conversion.Kind == ConversionKind.Identity) 3161if (conversion.Kind != ConversionKind.Identity)
Binder\ForEachLoopBinder.cs (1)
471if (elementConversionClassification.Kind != ConversionKind.Identity && IterationVariable.RefKind is RefKind.Ref or RefKind.RefReadOnly)
Binder\RefSafetyAnalysis.cs (1)
1032case ConversionKind.Identity:
Binder\Semantics\Conversions\Conversion.cs (4)
222case ConversionKind.Identity: 268internal static Conversion Identity => new Conversion(ConversionKind.Identity); 354ConversionKind.Identity => kind == ConversionKind.ImplicitNullable ? ImplicitNullableWithIdentityUnderlying : ExplicitNullableWithIdentityUnderlying, 647return Kind == ConversionKind.Identity;
Binder\Semantics\Conversions\ConversionEasyOut.cs (1)
23const byte IDN = (byte)ConversionKind.Identity;
Binder\Semantics\Conversions\ConversionKindExtensions.cs (1)
26case Identity:
Binder\Semantics\Conversions\ConversionsBase.cs (3)
589case ConversionKind.Identity: 890case ConversionKind.Identity: 2007case ConversionKind.Identity:
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (1)
651case ConversionKind.Identity:
Binder\Semantics\OverloadResolution\OverloadResolution.cs (5)
2191if (allSame && Conversions.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity) 2200if (Conversions.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity) 2313if (Conversions.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity) 2863return conv1.Kind == ConversionKind.Identity ? BetterResult.Left : BetterResult.Neither; 2867return conv2.Kind == ConversionKind.Identity ? BetterResult.Right : BetterResult.Neither;
BoundTree\BoundExpression.cs (1)
495case ConversionKind.Identity:
CodeGen\EmitConversion.cs (1)
95case ConversionKind.Identity:
FlowAnalysis\NullableWalker.cs (7)
2060case ConversionKind.Identity: 2722Debug.Assert(conversion.Kind is ConversionKind.Identity or ConversionKind.ImplicitReference); 8558case ConversionKind.Identity: 8949goto case ConversionKind.Identity; 8951case ConversionKind.Identity: 10391case ConversionKind.Identity: 11548case ConversionKind.Identity:
FlowAnalysis\NullableWalker_Patterns.cs (2)
466case ConversionKind.Identity: 765ConversionKind.Identity => true,
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
627case ConversionKind.Identity: 719case ConversionKind.Identity:
Lowering\DiagnosticsPass_Warnings.cs (1)
896case ConversionKind.Identity:
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
584case ConversionKind.Identity:
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
204if (conversion.Kind is not (ConversionKind.Identity or ConversionKind.ImplicitReference)) 211return conversion.Kind is ConversionKind.Identity or ConversionKind.ImplicitReference;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (2)
252return conversion.ConversionKind == ConversionKind.Identity && !conversion.ExplicitCastInCode; 319case ConversionKind.Identity:
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (1)
307if ((tupleConversion.Conversion.Kind == ConversionKind.ImplicitTupleLiteral || tupleConversion.Conversion.Kind == ConversionKind.Identity)
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (2)
92BoundNode.GetConversion(leftConversion, leftPlaceholder) is { Kind: ConversionKind.Identity or ConversionKind.ImplicitReference }) 224if (boundConversion.ConversionKind != ConversionKind.Identity)
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (1)
49case BoundConversion { Conversion: { Kind: ConversionKind.Identity }, Operand: var o }:
Lowering\SyntheticBoundNodeFactory.cs (1)
559if (conversion.Kind != ConversionKind.Identity)