44 references to IsValid
Microsoft.CodeAnalysis.CSharp (44)
Binder\Binder.cs (1)
626
if (conversion.
IsValid
&& conversion.Method is object)
Binder\Binder_Await.cs (1)
424
Debug.Assert(conversion.
IsValid
);
Binder\Binder_Expressions.cs (10)
1224
if (!conversion.IsImplicit || !conversion.
IsValid
)
1273
if (!conversion.IsImplicit || !conversion.
IsValid
)
2587
if (!conversion.
IsValid
)
2693
if (!conversion.
IsValid
)
2710
bool hasErrors = !conversion.
IsValid
|| targetType.IsStatic;
2864
if (!elementConversion.
IsValid
)
5250
Debug.Assert(conversion.
IsValid
);
5348
if (!conversion.IsImplicit || !conversion.
IsValid
)
5433
Debug.Assert(conv.
IsValid
); // i.e. if it exists, then it is valid.
6954
if (!conversion.
IsValid
)
Binder\Binder_Invocation.cs (2)
1683
if (!conversion.
IsValid
&& defaultConstantValue is { SpecialType: SpecialType.System_Decimal or SpecialType.System_DateTime })
1692
if (!conversion.
IsValid
)
Binder\Binder_Operators.cs (2)
224
if (!rightToLeftConversion.IsImplicit || !rightToLeftConversion.
IsValid
)
272
if (!argumentConversion.IsImplicit || !argumentConversion.
IsValid
) // NOTE: dev10 appears to allow user-defined conversions here.
Binder\Binder_Statements.cs (7)
1373
if (!elementConversionClassification.
IsValid
|| !elementConversionClassification.IsImplicit)
1379
if (elementConversionClassification.
IsValid
)
1960
else if (!conversion.
IsValid
||
2234
Debug.Assert(!conversion.IsImplicit || !conversion.
IsValid
);
2425
if (!conversion.IsImplicit || !conversion.
IsValid
)
2525
if (!elementConversion.
IsValid
)
3174
else if (!conversion.IsImplicit || !conversion.
IsValid
)
Binder\ForEachLoopBinder.cs (4)
480
if (!elementConversionClassification.
IsValid
)
541
Debug.Assert(collectionConversionClassification.
IsValid
);
542
Debug.Assert(currentConversionClassification.
IsValid
||
554
if (currentConversionClassification.
IsValid
)
Binder\Semantics\Conversions\Conversion.cs (1)
577
if (!conv.
IsValid
)
Binder\Semantics\Conversions\Conversions.cs (1)
494
if (pointerConversion.
IsValid
)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (2)
383
if (Conversions.ClassifyImplicitConversionFromExpression(left, systemDelegateType, ref useSiteInfo).
IsValid
&&
384
Conversions.ClassifyImplicitConversionFromExpression(right, systemDelegateType, ref useSiteInfo).
IsValid
)
Binder\SwitchBinder.cs (2)
259
if (!conversion.
IsValid
)
414
if (conversion.
IsValid
)
BoundTree\Constructors.cs (2)
369
hasErrors || !conversion.
IsValid
)
396
hasErrors: hasErrors || !conversion.
IsValid
)
Compilation\CSharpSemanticModel.cs (1)
2137
conversion = convertedSwitchConversion.
IsValid
? convertedSwitchConversion : Conversion.NoConversion;
FlowAnalysis\AbstractFlowPass.cs (1)
3001
if (!conversion.
IsValid
)
FlowAnalysis\NullableWalker.cs (2)
7365
if (conversion is {
IsValid
: true, Kind: ConversionKind.ImplicitUserDefined })
9349
if (!conversion.
IsValid
)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (3)
790
if (!conversion.
IsValid
)
818
if (!conversion.
IsValid
)
845
Debug.Assert(conversion.
IsValid
);
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (2)
33
Debug.Assert(BoundNode.GetConversion(leftConversion, leftPlaceholder).
IsValid
);
240
Debug.Assert(BoundNode.GetConversion(leftConversion, leftPlaceholder).
IsValid
);