50 references to IsNullable
Microsoft.CodeAnalysis.CSharp (29)
Binder\Binder_Conversions.cs (11)
106
if ((conversion.IsTupleLiteralConversion || (conversion.
IsNullable
&& conversion.UnderlyingConversions[0].IsTupleLiteralConversion)))
195
(conversion.
IsNullable
&& conversion.UnderlyingConversions[0].IsTupleLiteralConversion))
278
|| (conversion.
IsNullable
&& conversion.UnderlyingConversions[0].IsCollectionExpression)
377
if (conversion.
IsNullable
)
891
if (conversion.
IsNullable
)
2601
Debug.Assert(toParameterTypeConversion.
IsNullable
);
2653
Debug.Assert(fromReturnTypeConversion.
IsNullable
);
2751
Debug.Assert(analysis.TargetConversion is { IsIdentity: true } or {
IsNullable
: true, IsImplicit: true });
3136
(conversion.
IsNullable
&& conversion.UnderlyingConversions[0].IsTupleLiteralConversion));
3140
Debug.Assert(conversion.
IsNullable
== destination.IsNullableType());
3145
if (conversion.
IsNullable
)
Binder\Binder_Patterns.cs (4)
294
(conversion.
IsNullable
&& conversion.UnderlyingConversions[0].IsIdentity)))
341
(bestMatchConversion.
IsNullable
&& bestMatchConversion.UnderlyingConversions[0].IsIdentity));
342
Debug.Assert(!bestMatchConversion.IsReference || !conversion.
IsNullable
);
343
Debug.Assert(!conversion.IsReference || !bestMatchConversion.
IsNullable
);
Binder\Semantics\Conversions\Conversion.cs (2)
164
Debug.Assert(!(this is {
IsNullable
: true, UnderlyingConversions: var underlying } && (underlying[0].IsUserDefined || underlying[0].IsUnion)));
1220
return new CommonConversion(Exists, IsIdentity, IsNumeric, IsReference, IsImplicit,
IsNullable
, methodSymbol, constrainedToType);
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (1)
1038
Debug.Assert(targetConversion.IsIdentity || (targetConversion.
IsNullable
&& targetConversion.UnderlyingConversions[0].IsIdentity));
BoundTree\BoundConversion.cs (6)
17
(Conversion.
IsNullable
&& Conversion.UnderlyingConversions[0].IsTupleLiteralConversion))
25
(Conversion.
IsNullable
&& Conversion.UnderlyingConversions[0].IsTupleLiteralConversion));
86
(Conversion.IsExplicit && Conversion.
IsNullable
&&
100
Debug.Assert(Conversion.
IsNullable
);
118
Debug.Assert(Conversion.
IsNullable
);
203
Debug.Assert(Conversion.
IsNullable
);
FlowAnalysis\NullableWalker.cs (1)
10607
Debug.Assert(analysis.TargetConversion is { IsIdentity: true } or {
IsNullable
: true, IsImplicit: true });
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
966
Debug.Assert(analysis.TargetConversion is { IsIdentity: true } or {
IsNullable
: true, IsImplicit: true });
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (2)
409
case BoundConversion { Conversion: {
IsNullable
: true, UnderlyingConversions: var underlying } conversion, Operand: var o }
444
case BoundConversion { Conversion: {
IsNullable
: true, UnderlyingConversions: var nested }, Operand: var o } conv when
Symbols\Source\ParameterHelpers.cs (1)
1016
else if (((conversion.
IsNullable
&& !defaultExpression.Type.IsNullableType()) ||
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (7)
235
(conversion.IsNumeric || conversion.
IsNullable
) &&
381
originalConversion.
IsNullable
)
767
if (!innerOriginalConversion.IsImplicit || !innerOriginalConversion.
IsNullable
)
778
if (!outerOriginalConversion.IsImplicit || !outerOriginalConversion.
IsNullable
)
938
if (originalConversion is {
IsNullable
: false, IsNumeric: false })
941
if (originalConversion.
IsNullable
)
1177
if (conversion.
IsNullable
&& castOrAsNode is CastExpressionSyntax castExpression)
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (7)
235
(conversion.IsNumeric || conversion.
IsNullable
) &&
381
originalConversion.
IsNullable
)
767
if (!innerOriginalConversion.IsImplicit || !innerOriginalConversion.
IsNullable
)
778
if (!outerOriginalConversion.IsImplicit || !outerOriginalConversion.
IsNullable
)
938
if (originalConversion is {
IsNullable
: false, IsNumeric: false })
941
if (originalConversion.
IsNullable
)
1177
if (conversion.
IsNullable
&& castOrAsNode is CastExpressionSyntax castExpression)
Roslyn.Diagnostics.CSharp.Analyzers (7)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (7)
235
(conversion.IsNumeric || conversion.
IsNullable
) &&
381
originalConversion.
IsNullable
)
767
if (!innerOriginalConversion.IsImplicit || !innerOriginalConversion.
IsNullable
)
778
if (!outerOriginalConversion.IsImplicit || !outerOriginalConversion.
IsNullable
)
938
if (originalConversion is {
IsNullable
: false, IsNumeric: false })
941
if (originalConversion.
IsNullable
)
1177
if (conversion.
IsNullable
&& castOrAsNode is CastExpressionSyntax castExpression)