46 references to Identity
Microsoft.CodeAnalysis.CSharp (46)
Binder\Binder_Operators.cs (2)
3640case ConversionKind.Identity: 3884case ConversionKind.Identity:
Binder\Binder_Statements.cs (3)
1951if (conversion.Kind != ConversionKind.Identity) 2677if (conversion.Kind == ConversionKind.Identity) 3164if (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)
1057case 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)
656case ConversionKind.Identity:
Binder\Semantics\OverloadResolution\OverloadResolution.cs (5)
2199if (allSame && Conversions.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity) 2208if (Conversions.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity) 2321if (Conversions.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity) 2871return conv1.Kind == ConversionKind.Identity ? BetterResult.Left : BetterResult.Neither; 2875return 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)
2121case ConversionKind.Identity: 2783Debug.Assert(conversion.Kind is ConversionKind.Identity or ConversionKind.ImplicitReference); 8616case ConversionKind.Identity: 9007goto case ConversionKind.Identity; 9009case ConversionKind.Identity: 10449case ConversionKind.Identity: 11606case 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)
583case ConversionKind.Identity:
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
207if (conversion.Kind is not (ConversionKind.Identity or ConversionKind.ImplicitReference)) 214return 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)