159 references to IsNullableType
Microsoft.CodeAnalysis.VisualBasic (155)
Binding\Binder_ConditionalAccess.vb (1)
54
If type.
IsNullableType
() Then
Binding\Binder_Conversions.vb (1)
1626
Debug.Assert(Not isNullableTupleConversion OrElse destination.
IsNullableType
())
Binding\Binder_Delegates.vb (1)
299
fromMethod.ContainingType.
IsNullableType
AndAlso
Binding\Binder_Expressions.vb (5)
950
If Not resultType.
IsNullableType
() Then
1988
ElseIf boundFirstArg.Type IsNot Nothing AndAlso boundFirstArg.Type.
IsNullableType
AndAlso boundSecondArg.IsNothingLiteral Then
1996
If boundFirstArg.Type IsNot Nothing AndAlso boundFirstArg.Type.
IsNullableType
AndAlso
1997
Not (boundSecondArg.Type IsNot Nothing AndAlso boundSecondArg.Type.
IsNullableType
) Then
2094
If Not hasErrors AndAlso Not (boundFirstArg.IsNothingLiteral OrElse boundFirstArg.Type.
IsNullableType
OrElse boundFirstArg.Type.IsReferenceType) Then
Binding\Binder_Operators.vb (21)
85
ElseIf targetArgumentType.
IsNullableType
() Then
308
If (operatorKind And BinaryOperatorKind.Lifted) = 0 OrElse leftType.
IsNullableType
() Then
311
Debug.Assert(rightType.
IsNullableType
())
430
If left.Type.
IsNullableType
Then
434
If right.Type.
IsNullableType
Then
814
Debug.Assert(Not makeNullable OrElse leftType.
IsNullableType
() OrElse rightType.
IsNullableType
())
826
ElseIf leftType.
IsNullableType
() Then
829
Debug.Assert(makeNullable AndAlso rightType.
IsNullableType
())
833
rightType.
IsNullableType
() AndAlso
834
Not leftType.
IsNullableType
())
842
ElseIf rightType.
IsNullableType
() Then
846
Not rightType.
IsNullableType
() AndAlso
847
leftType.
IsNullableType
())
855
If leftType.
IsNullableType
() Then
858
Debug.Assert(rightType.
IsNullableType
())
876
Dim leftIsNullable = leftType.
IsNullableType
()
877
Dim rightIsNullable = rightType.
IsNullableType
()
921
If resultType Is Nothing OrElse Not (resultType.
IsNullableType
() OrElse resultType.IsObjectType()) Then
1168
If operandType.
IsNullableType
() Then
1174
Debug.Assert(((operatorKind And UnaryOperatorKind.Lifted) <> 0) = resultType.
IsNullableType
())
Binding\Binder_Statements.vb (3)
1612
ElseIf valueType.
IsNullableType
Then
1649
If Not rhsElementType.
IsNullableType
Then
3299
If targetType.
IsNullableType
Then
Binding\Binder_Utils.vb (2)
1460
If context = ConstantContext.ParameterDefaultValue AndAlso conversionType.
IsNullableType
Then
1503
If conversionType.
IsNullableType
Then
BoundTree\BoundCall.vb (4)
97
If isLifted.GetValueOrDefault() AndAlso Not Method.ReturnType.
IsNullableType
() Then
99
Type.
IsNullableType
() AndAlso
121
type.
IsNullableType
() AndAlso
130
type.
IsNullableType
() AndAlso
BoundTree\BoundConversion.vb (2)
72
Debug.Assert(udc.Type.
IsNullableType
() AndAlso Not underlyingCall.Method.Parameters(0).Type.
IsNullableType
())
BoundTree\BoundUserDefinedBinaryOperator.vb (2)
47
Debug.Assert(argument.Type.
IsNullableType
() AndAlso
51
Debug.Assert(underlyingCall.Type.
IsNullableType
())
BoundTree\BoundUserDefinedUnaryOperator.vb (2)
41
argument.Type.
IsNullableType
() AndAlso
44
Debug.Assert(underlyingCall.Type.
IsNullableType
())
CodeGen\EmitConversion.vb (2)
174
ElseIf typeFrom.
IsNullableType
Then
188
ElseIf typeTo.
IsNullableType
Then
CodeGen\EmitExpression.vb (1)
475
If Not isStatic AndAlso targetMethod.ContainingType.
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)
84
Debug.Assert(Not isLifted OrElse Not node.Call.Method.ReturnType.
IsNullableType
)
94
Debug.Assert(Not isLifted OrElse Not node.Call.Method.ReturnType.
IsNullableType
)
161
If originalRight.Type.
IsNullableType
Then
168
If originalLeft.Type.
IsNullableType
Then
175
Dim operandIsNullable As Boolean = operandType.
IsNullableType
210
Return ConvertRuntimeHelperToExpressionTree(opMethod, left, right, Me._factory.Literal(resultType.
IsNullableType
), _factory.MethodInfo(helper))
261
Return ConvertRuntimeHelperToExpressionTree(opMethod, left, right, Me._factory.Literal(resultType.
IsNullableType
), Me._factory.Null)
351
Dim resultTypeIsNullable As Boolean = resultType.
IsNullableType
423
If resultType.
IsNullableType
AndAlso originalRight.Kind = BoundKind.Conversion Then
428
If ((conversion.ConversionKind And ConversionKind.Nullable) <> 0) AndAlso Not conversion.ExplicitCastInCode AndAlso Not operandType.
IsNullableType
Then
429
Debug.Assert(conversion.Type.
IsNullableType
AndAlso conversion.Type.GetNullableUnderlyingType.SpecialType = SpecialType.System_Int32)
470
Dim isNullable As Boolean = shiftedType.
IsNullableType
641
Debug.Assert(oldArg.Type.
IsNullableType
)
642
Debug.Assert(Not parameterType.
IsNullableType
)
701
If resultType.
IsNullableType
<> methodReturnType.
IsNullableType
Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_ConditionalExpresion.vb (7)
47
(testExpressionType.
IsNullableType
AndAlso resultType.IsSameTypeIgnoringAll(testExpressionType.GetNullableUnderlyingType)) Then
110
If (convKind And ConversionKind.NarrowingNullable) = ConversionKind.NarrowingNullable AndAlso Not toType.
IsNullableType
Then
123
Debug.Assert(nullableType.
IsNullableType
)
241
If realParameterType.
IsNullableType
AndAlso Not method.Parameters(0).Type.
IsNullableType
AndAlso
242
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)
76
Dim origArgTypeIsNullable As Boolean = origArgType.
IsNullableType
143
Debug.Assert(lambdaParameter.Type.
IsNullableType
)
176
Debug.Assert(Not isLifted OrElse Not node.Call.Method.ReturnType.
IsNullableType
)
Lowering\LocalRewriter\LocalRewriter_BinaryOperators.vb (8)
247
If (node.Left.Type IsNot Nothing AndAlso node.Left.Type.
IsNullableType
) OrElse
248
(node.Right.Type IsNot Nothing AndAlso node.Right.Type.
IsNullableType
) Then
1327
Debug.Assert(operand.Type.
IsNullableType
)
1398
Debug.Assert(resultType.
IsNullableType
())
1401
Debug.Assert(left.Type.
IsNullableType
() AndAlso right.Type.
IsNullableType
(), "left and right must be nullable")
1501
Debug.Assert(Not left.Type.
IsNullableType
)
1502
Debug.Assert(Not right.Type.
IsNullableType
)
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.vb (3)
50
If receiverType.
IsNullableType
() Then
126
If needWhenNotNullPart AndAlso Not accessResultType.
IsNullableType
() AndAlso accessResultType.IsValueType Then
131
whenNull = If(node.Type.
IsNullableType
(), NullableNull(node.Syntax, node.Type), factory.Null(node.Type))
Lowering\LocalRewriter\LocalRewriter_ConditionalExpressions.vb (4)
23
If node.TestExpression.Type IsNot Nothing AndAlso node.TestExpression.Type.
IsNullableType
Then
140
If Not testExpressionType.IsNullableOfBoolean AndAlso testExpressionType.
IsNullableType
Then
152
If(testExpressionType.
IsNullableType
,
240
If rewrittenLeft.Type.
IsNullableType
() AndAlso
Lowering\LocalRewriter\LocalRewriter_Conversion.vb (14)
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
640
If operandType.
IsNullableType
Then
664
If resultType.
IsNullableType
Then
693
Debug.Assert(operand.Type.
IsNullableType
)
709
Debug.Assert(resultType.
IsNullableType
, "lifted operator must have nullable type")
834
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 (9)
157
Debug.Assert(expr.Type.
IsNullableType
)
214
Debug.Assert(expr.Type.
IsNullableType
)
241
Debug.Assert(expr.Type.
IsNullableType
)
267
Debug.Assert(nullableType.
IsNullableType
)
332
Debug.Assert(expr.Type.
IsNullableType
)
349
Debug.Assert(expr.Type.
IsNullableType
)
378
Debug.Assert(Not left.Type.
IsNullableType
)
379
Debug.Assert(Not right.Type.
IsNullableType
)
548
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)
1245
If destination.
IsNullableType
Then
1480
(sourceType.
IsNullableType
() OrElse sourceType.CanContainUserDefinedOperators(useSiteInfo)) Then
3464
Dim srcIsNullable As Boolean = source.
IsNullableType
()
3465
Dim dstIsNullable As Boolean = destination.
IsNullableType
()
3477
If srcUnderlying.Kind = SymbolKind.ErrorType OrElse Not srcUnderlying.IsValueType OrElse srcUnderlying.
IsNullableType
() Then
3485
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
3197
Dim isNullable1 As Boolean = type1.
IsNullableType
()
3208
isNullable2 = type2.
IsNullableType
()
3255
Return Not type.
IsNullableType
AndAlso type.IsValueType() AndAlso Not type.IsRestrictedType()
3259
Return type.
IsNullableType
() ' Note, Dev11 has changed implementation of this function, I've taken this into account.
3282
Debug.Assert(type.
IsNullableType
())
Semantics\OverloadResolution.vb (2)
2542
sourceType.
IsNullableType
() AndAlso
2543
Not targetType.
IsNullableType
()
Semantics\TypeInference\TypeArgumentInference.vb (2)
1401
If(parameterType.
IsNullableType
(), argumentType.GetNullableUnderlyingTypeOrSelf(), argumentType).
1542
ElseIf parameterTypeAsNamedType.
IsNullableType
() Then
Symbols\ConstraintsHelper.vb (2)
980
If (containingType IsNot Nothing) AndAlso containingType.
IsNullableType
() Then
1092
Return type.
IsNullableType
()
Symbols\Source\SourceMemberContainerTypeSymbol.vb (1)
908
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
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Semantics\Conversions.vb (4)
2086
Dim fromIsNullable = from.
IsNullableType
()
2093
Dim toIsNullable = [to].
IsNullableType
()
2124
Dim toIsNullable = [to].
IsNullableType
()
2131
Dim fromIsNullable = from.
IsNullableType
()