155 references to IsNullableType
Microsoft.CodeAnalysis.VisualBasic (155)
Binding\Binder_ConditionalAccess.vb (1)
54
If type.
IsNullableType
() Then
Binding\Binder_Conversions.vb (1)
1641
Debug.Assert(Not isNullableTupleConversion OrElse destination.
IsNullableType
())
Binding\Binder_Delegates.vb (1)
299
fromMethod.ContainingType.
IsNullableType
AndAlso
Binding\Binder_Expressions.vb (5)
971
If Not resultType.
IsNullableType
() Then
2013
ElseIf boundFirstArg.Type IsNot Nothing AndAlso boundFirstArg.Type.
IsNullableType
AndAlso boundSecondArg.IsNothingLiteral Then
2021
If boundFirstArg.Type IsNot Nothing AndAlso boundFirstArg.Type.
IsNullableType
AndAlso
2022
Not (boundSecondArg.Type IsNot Nothing AndAlso boundSecondArg.Type.
IsNullableType
) Then
2119
If Not hasErrors AndAlso Not (boundFirstArg.IsNothingLiteral OrElse boundFirstArg.Type.
IsNullableType
OrElse boundFirstArg.Type.IsReferenceType) Then
Binding\Binder_Operators.vb (21)
115
ElseIf targetArgumentType.
IsNullableType
() Then
338
If (operatorKind And BinaryOperatorKind.Lifted) = 0 OrElse leftType.
IsNullableType
() Then
341
Debug.Assert(rightType.
IsNullableType
())
460
If left.Type.
IsNullableType
Then
464
If right.Type.
IsNullableType
Then
844
Debug.Assert(Not makeNullable OrElse leftType.
IsNullableType
() OrElse rightType.
IsNullableType
())
856
ElseIf leftType.
IsNullableType
() Then
859
Debug.Assert(makeNullable AndAlso rightType.
IsNullableType
())
863
rightType.
IsNullableType
() AndAlso
864
Not leftType.
IsNullableType
())
872
ElseIf rightType.
IsNullableType
() Then
876
Not rightType.
IsNullableType
() AndAlso
877
leftType.
IsNullableType
())
885
If leftType.
IsNullableType
() Then
888
Debug.Assert(rightType.
IsNullableType
())
906
Dim leftIsNullable = leftType.
IsNullableType
()
907
Dim rightIsNullable = rightType.
IsNullableType
()
951
If resultType Is Nothing OrElse Not (resultType.
IsNullableType
() OrElse resultType.IsObjectType()) Then
1198
If operandType.
IsNullableType
() Then
1204
Debug.Assert(((operatorKind And UnaryOperatorKind.Lifted) <> 0) = resultType.
IsNullableType
())
Binding\Binder_Statements.vb (3)
1641
ElseIf valueType.
IsNullableType
Then
1678
If Not rhsElementType.
IsNullableType
Then
3328
If targetType.
IsNullableType
Then
Binding\Binder_Utils.vb (2)
1460
If context = ConstantContext.ParameterDefaultValue AndAlso conversionType.
IsNullableType
Then
1503
If conversionType.
IsNullableType
Then
CodeGen\EmitAddress.vb (2)
74
Debug.Assert(Not expression.Type.IsValueType OrElse expression.Type.
IsNullableType
())
293
Return addressKind = AddressKind.ReadOnly OrElse addressKind = AddressKind.Immutable Or expression.Type.
IsNullableType
()
CodeGen\EmitConversion.vb (2)
174
ElseIf typeFrom.
IsNullableType
Then
188
ElseIf typeTo.
IsNullableType
Then
CodeGen\EmitExpression.vb (2)
256
If receiverType.
IsNullableType
() Then
501
If Not isStatic AndAlso targetMethod.ContainingType.
IsNullableType
Then
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Expressions.vb (8)
615
Debug.Assert(Not receiver.Type.
IsNullableType
() OrElse Not conditionalAccessReceiverPlaceholderReplacementInfo.IsSpilled)
616
Debug.Assert(Not receiver.Type.
IsNullableType
() OrElse node.CaptureReceiver)
620
Debug.Assert(Not receiver.Type.
IsNullableType
() OrElse Not conditionalAccessReceiverPlaceholderReplacementInfo.ForceCaptureIfReferenceType)
629
If Not receiver.Type.IsReferenceType AndAlso Not receiver.Type.
IsNullableType
() Then
636
Debug.Assert(Not receiver.Type.
IsNullableType
())
677
If nullCheckTarget.Type.IsReferenceType OrElse nullCheckTarget.Type.
IsNullableType
() Then
694
Debug.Assert(Not receiver.Type.
IsNullableType
())
714
ElseIf nullCheckTarget.Type.
IsNullableType
() Then
Lowering\Diagnostics\DiagnosticsPass_ExpressionLambdas.vb (2)
44
If method.ReturnType.
IsNullableType
Then
98
If method.ReturnType.
IsNullableType
Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_BinaryOperator.vb (16)
74
Debug.Assert(Not isLifted OrElse Not node.Call.Method.ReturnType.
IsNullableType
)
84
Debug.Assert(Not isLifted OrElse Not node.Call.Method.ReturnType.
IsNullableType
)
225
If originalRight.Type.
IsNullableType
Then
232
If originalLeft.Type.
IsNullableType
Then
239
Dim operandIsNullable As Boolean = operandType.
IsNullableType
273
left, right, Me._factory.Literal(resultType.
IsNullableType
), _factory.MethodInfo(helper, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo)))
325
left, right, Me._factory.Literal(resultType.
IsNullableType
),
431
Dim resultTypeIsNullable As Boolean = resultType.
IsNullableType
547
If resultType.
IsNullableType
AndAlso originalRight.Kind = BoundKind.Conversion Then
552
If ((conversion.ConversionKind And ConversionKind.Nullable) <> 0) AndAlso Not conversion.ExplicitCastInCode AndAlso Not operandType.
IsNullableType
Then
553
Debug.Assert(conversion.Type.
IsNullableType
AndAlso conversion.Type.GetNullableUnderlyingType.SpecialType = SpecialType.System_Int32)
596
Dim isNullable As Boolean = shiftedType.
IsNullableType
723
Debug.Assert(oldArg.Type.
IsNullableType
)
724
Debug.Assert(Not parameterType.
IsNullableType
)
783
If resultType.
IsNullableType
<> methodReturnType.
IsNullableType
Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_ConditionalExpresion.vb (7)
47
(testExpressionType.
IsNullableType
AndAlso resultType.IsSameTypeIgnoringAll(testExpressionType.GetNullableUnderlyingType)) Then
113
If (convKind And ConversionKind.NarrowingNullable) = ConversionKind.NarrowingNullable AndAlso Not toType.
IsNullableType
Then
126
Debug.Assert(nullableType.
IsNullableType
)
244
If realParameterType.
IsNullableType
AndAlso Not method.Parameters(0).Type.
IsNullableType
AndAlso
245
toType.
IsNullableType
AndAlso Not method.ReturnType.
IsNullableType
Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_Conversion.vb (5)
60
Dim toIsNullable As Boolean = typeTo.
IsNullableType
132
Dim fromIsNullable As Boolean = typeFrom.
IsNullableType
133
Dim toIsNullable As Boolean = typeTo.
IsNullableType
377
If originalArgument.Type.
IsNullableType
= resultType.
IsNullableType
Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_UnaryOperator.vb (3)
89
Dim origArgTypeIsNullable As Boolean = origArgType.
IsNullableType
156
Debug.Assert(lambdaParameter.Type.
IsNullableType
)
189
Debug.Assert(Not isLifted OrElse Not node.Call.Method.ReturnType.
IsNullableType
)
Lowering\LocalRewriter\LocalRewriter_BinaryOperators.vb (8)
242
If (node.Left.Type IsNot Nothing AndAlso node.Left.Type.
IsNullableType
) OrElse
243
(node.Right.Type IsNot Nothing AndAlso node.Right.Type.
IsNullableType
) Then
1322
Debug.Assert(operand.Type.
IsNullableType
)
1393
Debug.Assert(resultType.
IsNullableType
())
1396
Debug.Assert(left.Type.
IsNullableType
() AndAlso right.Type.
IsNullableType
(), "left and right must be nullable")
1496
Debug.Assert(Not left.Type.
IsNullableType
)
1497
Debug.Assert(Not right.Type.
IsNullableType
)
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.vb (3)
50
If receiverType.
IsNullableType
() Then
129
If needWhenNotNullPart AndAlso Not accessResultType.
IsNullableType
() AndAlso accessResultType.IsValueType Then
134
whenNull = If(node.Type.
IsNullableType
(), NullableNull(node.Syntax, node.Type), factory.Null(node.Type))
Lowering\LocalRewriter\LocalRewriter_ConditionalExpressions.vb (4)
18
If node.TestExpression.Type IsNot Nothing AndAlso node.TestExpression.Type.
IsNullableType
Then
135
If Not testExpressionType.IsNullableOfBoolean AndAlso testExpressionType.
IsNullableType
Then
147
If(testExpressionType.
IsNullableType
,
234
If rewrittenLeft.Type.
IsNullableType
() AndAlso
Lowering\LocalRewriter\LocalRewriter_Conversion.vb (12)
53
If (node.Type IsNot Nothing AndAlso node.Type.
IsNullableType
OrElse
54
node.Operand.Type IsNot Nothing AndAlso node.Operand.Type.
IsNullableType
) AndAlso
400
Debug.Assert(resultType.
IsNullableType
OrElse
401
(operandType IsNot Nothing AndAlso operandType.
IsNullableType
),
439
ElseIf operandType.
IsNullableType
Then
483
If operandType.
IsNullableType
Then
484
If resultType.
IsNullableType
Then
570
If resultType.
IsNullableType
Then
607
Debug.Assert(operand.Type.
IsNullableType
)
623
Debug.Assert(resultType.
IsNullableType
, "lifted operator must have nullable type")
748
ElseIf underlyingTypeFrom.
IsNullableType
OrElse underlyingTypeTo.
IsNullableType
Then
Lowering\LocalRewriter\LocalRewriter_ForTo.vb (4)
114
If stepValue.Type.
IsNullableType
Then
578
If controlVariable.Type.
IsNullableType
Then
596
If controlVariable.Type.
IsNullableType
Then
732
If controlVariable.Type.
IsNullableType
Then
Lowering\LocalRewriter\LocalRewriter_NullableHelpers.vb (10)
153
Debug.Assert(expr.Type.
IsNullableType
)
210
Debug.Assert(expr.Type.
IsNullableType
)
235
Debug.Assert(expr.Type.
IsNullableType
)
262
Debug.Assert(expr.Type.
IsNullableType
)
288
Debug.Assert(nullableType.
IsNullableType
)
353
Debug.Assert(expr.Type.
IsNullableType
)
370
Debug.Assert(expr.Type.
IsNullableType
)
399
Debug.Assert(Not left.Type.
IsNullableType
)
400
Debug.Assert(Not right.Type.
IsNullableType
)
569
If operand.Type.
IsNullableType
Then
Lowering\LocalRewriter\LocalRewriter_UnaryOperators.vb (3)
240
Debug.Assert(resultType.
IsNullableType
())
243
Debug.Assert(operand.Type.
IsNullableType
, "operand must be nullable")
313
Debug.Assert(Not operandValue.Type.
IsNullableType
)
Semantics\CompileTimeCalculations.vb (1)
686
(targetType.
IsNullableType
() AndAlso targetType.GetNullableUnderlyingType().IsIntrinsicType()) Then
Semantics\Conversions.vb (6)
1249
If destination.
IsNullableType
Then
1484
(sourceType.
IsNullableType
() OrElse sourceType.CanContainUserDefinedOperators(useSiteInfo)) Then
3469
Dim srcIsNullable As Boolean = source.
IsNullableType
()
3470
Dim dstIsNullable As Boolean = destination.
IsNullableType
()
3482
If srcUnderlying.Kind = SymbolKind.ErrorType OrElse Not srcUnderlying.IsValueType OrElse srcUnderlying.
IsNullableType
() Then
3490
If dstUnderlying.Kind = SymbolKind.ErrorType OrElse Not dstUnderlying.IsValueType OrElse dstUnderlying.
IsNullableType
() Then
Semantics\Operators.vb (13)
1988
If source.
IsNullableType
() AndAlso destination.
IsNullableType
() Then
2002
Debug.Assert(Not bestMatch.Parameters(0).Type.
IsNullableType
())
2003
Debug.Assert(Not bestMatch.ReturnType.
IsNullableType
())
2010
Debug.Assert(Not bestMatch.Parameters(0).Type.
IsNullableType
())
2011
Debug.Assert(Not bestMatch.ReturnType.
IsNullableType
())
2548
If source.
IsNullableType
() AndAlso destination.
IsNullableType
() AndAlso
3202
Dim isNullable1 As Boolean = type1.
IsNullableType
()
3213
isNullable2 = type2.
IsNullableType
()
3266
Return Not type.
IsNullableType
AndAlso type.IsValueType() AndAlso Not type.IsRestrictedType()
3270
Return type.
IsNullableType
() ' Note, Dev11 has changed implementation of this function, I've taken this into account.
3293
Debug.Assert(type.
IsNullableType
())
Semantics\OverloadResolution.vb (2)
2903
sourceType.
IsNullableType
() AndAlso
2904
Not targetType.
IsNullableType
()
Semantics\TypeInference\TypeArgumentInference.vb (2)
1396
If(parameterType.
IsNullableType
(), argumentType.GetNullableUnderlyingTypeOrSelf(), argumentType).
1537
ElseIf parameterTypeAsNamedType.
IsNullableType
() Then
Symbols\ConstraintsHelper.vb (2)
1021
If (containingType IsNot Nothing) AndAlso containingType.
IsNullableType
() Then
1133
Return type.
IsNullableType
()
Symbols\Source\SourceMemberContainerTypeSymbol.vb (1)
901
If namedType.
IsNullableType
() Then
Symbols\TypeSymbolExtensions.vb (3)
20
Return this.
IsNullableType
() AndAlso this.GetNullableUnderlyingType().IsBooleanType()
25
Debug.Assert(type.
IsNullableType
)
33
If type.
IsNullableType
() Then