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