903 references to ConversionKind
Microsoft.CodeAnalysis.VisualBasic (903)
Analysis\InitializerRewriter.vb (1)
78ConversionKind.WideningNothingLiteral,
Binding\Binder_Conversions.vb (64)
87Dim conv As ConversionKind = Conversions.ClassifyDirectCastConversion(argument, targetType, Me, useSiteInfo) 99argument = New BoundDirectCast(node, argument, ConversionKind.Identity, targetType) 153conv = ConversionKind.WideningNothingLiteral OrElse 197Dim conv As ConversionKind 216argument = New BoundTryCast(node, argument, ConversionKind.Identity, targetType) 356Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) 428convKind As KeyValuePair(Of ConversionKind, MethodSymbol), 447If (convKind.Key And ConversionKind.UserDefined) = 0 AndAlso 455argument = New BoundConversion(tree, argument, ConversionKind.Identity, CheckOverflow, isExplicit, targetType) 474Debug.Assert(argument.Kind <> BoundKind.ArrayLiteral OrElse (convKind.Key And ConversionKind.UserDefined) <> 0) 519(convKind.Key And ConversionKind.InvolvesNarrowingFromNumericConstant) = 0 Then 546If (convKind.Key And ConversionKind.VarianceConversionAmbiguity) <> 0 Then 561If (convKind.Key And ConversionKind.AnonymousDelegate) = 0 OrElse 562(convKind.Key And ConversionKind.DelegateRelaxationLevelMask) <> ConversionKind.DelegateRelaxationLevelWideningDropReturnOrArgs Then 568If (convKind.Key And ConversionKind.VarianceConversionAmbiguity) <> 0 Then 583If (convKind.Key And ConversionKind.UserDefined) <> 0 AndAlso convKind.Value IsNot Nothing Then 595Return New BoundConversion(tree, argument, convKind.Key And (Not ConversionKind.UserDefined), CheckOverflow, isExplicit, targetType, hasErrors:=True) 599If (convKind.Key And ConversionKind.UserDefined) <> 0 Then 660convKind As ConversionKind, 674convKind As ConversionKind, 683If (convKind And ConversionKind.UserDefined) <> 0 Then 837Dim conv As ConversionKind = Nothing 849If Not Conversions.IsNarrowingConversion(conv) OrElse (conv And ConversionKind.VarianceConversionAmbiguity) = 0 Then 865(conv And ConversionKind.VarianceConversionAmbiguity) = 0 Then 980convKind As ConversionKind, 985Debug.Assert(Conversions.ConversionExists(convKind) AndAlso (convKind And ConversionKind.UserDefined) = 0) 990If (convKind And ConversionKind.AnonymousDelegate) <> 0 Then 1002If (convKind And ConversionKind.NeedAStub) <> 0 Then 1017convKind And ConversionKind.DelegateRelaxationLevelMask, 1053If (convKind = ConversionKind.WideningReference OrElse convKind = ConversionKind.NarrowingReference) AndAlso 1065convKind As ConversionKind, 1069If (convKind And ConversionKind.Tuple) <> 0 Then 1091convKind As KeyValuePair(Of ConversionKind, MethodSymbol), 1097Debug.Assert((convKind.Key And ConversionKind.UserDefined) <> 0 AndAlso convKind.Value IsNot Nothing AndAlso 1109Dim intermediateConv As ConversionKind 1196convKind As ConversionKind, 1305convKind As ConversionKind, 1325Debug.Assert(Conversions.NoConversion(convKind) AndAlso (convKind And ConversionKind.DelegateRelaxationLevelMask) = 0) 1328(convKind And ConversionKind.DelegateRelaxationLevelMask) >= ConversionKind.DelegateRelaxationLevelWideningToNonLambda) 1345Debug.Assert((convKind And ConversionKind.DelegateRelaxationLevelMask) = 0) 1367Debug.Assert(delegateInvoke IsNot Nothing OrElse (convKind And ConversionKind.DelegateRelaxationLevelMask) = 0) 1379Debug.Assert((convKind And ConversionKind.DelegateRelaxationLevelMask) = 0) 1407Debug.Assert((convKind And ConversionKind.DelegateRelaxationLevelMask) >= boundLambda.DelegateRelaxation) 1409((convKind And ConversionKind.DelegateRelaxationLevelMask) <> ConversionKind.DelegateRelaxationLevelNone AndAlso 1418If (convKind And ConversionKind.DelegateRelaxationLevelMask) = ConversionKind.DelegateRelaxationLevelInvalid AndAlso 1452Dim anonymousDelegateInstance = New BoundConversion(tree, boundLambda, ConversionKind.Widening Or ConversionKind.Lambda, 1507convKind As ConversionKind, 1617Private Function ReclassifyInterpolatedStringExpression(conversionSemantics As SyntaxKind, tree As SyntaxNode, convKind As ConversionKind, isExplicit As Boolean, node As BoundInterpolatedStringExpression, targetType As TypeSymbol, diagnostics As BindingDiagnosticBag) As BoundExpression 1619If (convKind And ConversionKind.InterpolatedString) = ConversionKind.InterpolatedString Then 1623ConversionKind.InterpolatedString, False, isExplicit, targetType) 1631convKind As ConversionKind, 1640Dim isNullableTupleConversion = (convKind And ConversionKind.Nullable) <> 0 1692ConversionKind.Identity, 1702convKind As ConversionKind, 1782(elemConv And (ConversionKind.Reference Or ConversionKind.Value Or ConversionKind.TypeParameter)) <> 0) Then
Binding\Binder_Delegates.vb (13)
22Public ReadOnly DelegateConversions As ConversionKind 28DelegateConversions As ConversionKind, 137boundFirstArgument = New BoundConversion(node, boundFirstArgument, ConversionKind.Identity, CheckOverflow, True, delegateType) 324Dim delegateConversions As ConversionKind = Conversions.DetermineDelegateRelaxationLevel(methodConversions) 326If (delegateConversions And ConversionKind.DelegateRelaxationLevelInvalid) <> ConversionKind.DelegateRelaxationLevelInvalid Then 328delegateConversions = delegateConversions Or ConversionKind.Narrowing 330delegateConversions = delegateConversions Or ConversionKind.Widening 905) As ConversionKind 1021delegateResolutionResult.DelegateConversions And ConversionKind.DelegateRelaxationLevelMask, 1073delegateRelaxation As ConversionKind, 1142delegateRelaxation As ConversionKind, 1150Debug.Assert((delegateRelaxation And (Not ConversionKind.DelegateRelaxationLevelMask)) = 0)
Binding\Binder_Expressions.vb (6)
130Dim reclassified = ReclassifyArrayLiteralExpression(SyntaxKind.CTypeKeyword, arrayLiteral.Syntax, ConversionKind.Widening, False, arrayLiteral, arrayLiteral.InferredType, diagnostics) 792Dim convKind As ConversionKind = Conversions.ClassifyTryCastConversion(operandType, targetType, useSiteInfo) 1438Return New BoundConversion(expr.Syntax, expr, ConversionKind.WideningNothingLiteral, False, False, expr.ConstantValueOpt, 1490conv As ConversionKind, 1496Debug.Assert((conv And ConversionKind.UserDefined) = 0) 1499If Conversions.NoConversion(conv) AndAlso (conv And ConversionKind.FailedDueToArrayLiteralElementConversion) = 0 Then
Binding\Binder_Invocation.vb (16)
2322Dim arrayConversion As KeyValuePair(Of ConversionKind, MethodSymbol) = Nothing 2496Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.ClassifyConversion(boundTemp, copyBackType, Me, CompoundUseSiteInfo(Of AssemblySymbol).Discarded) 2503Debug.Assert((conv.Key And ConversionKind.InvolvesNarrowingFromNumericConstant) = 0) 2554Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.ClassifyConversion(argument, targetType, Me, CompoundUseSiteInfo(Of AssemblySymbol).Discarded) 2571If (conv.Key And ConversionKind.InvolvesNarrowingFromNumericConstant) = 0 Then 2589ElseIf (conv.Key And ConversionKind.InvolvesNarrowingFromNumericConstant) <> 0 Then 2699Dim conversion As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.Identity 2700Dim conversionBack As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.Identity 2795conversionTo As KeyValuePair(Of ConversionKind, MethodSymbol), 2797conversionFrom As KeyValuePair(Of ConversionKind, MethodSymbol), 2818conversionTo As KeyValuePair(Of ConversionKind, MethodSymbol), 2819conversionFrom As KeyValuePair(Of ConversionKind, MethodSymbol), 2826Dim checkAgainst As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.ClassifyConversion(argument, targetType, Me, CompoundUseSiteInfo(Of AssemblySymbol).Discarded) 2956conversion As KeyValuePair(Of ConversionKind, MethodSymbol), 2961Dim checkAgainst As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.ClassifyConversion(argument, targetType, Me, CompoundUseSiteInfo(Of AssemblySymbol).Discarded) 3188If Not (convertedValue.Kind = BoundKind.Conversion AndAlso (DirectCast(convertedValue, BoundConversion).ConversionKind And ConversionKind.UserDefined) <> 0) Then
Binding\Binder_Lambda.vb (18)
155Dim maxRelaxationLevel As ConversionKind = ConversionKind.DelegateRelaxationLevelNone 220Dim delegateRelaxation As ConversionKind = Nothing 226delegateRelaxation = ConversionKind.DelegateRelaxationLevelInvalid 'No conversion 230delegateRelaxation = ConversionKind.DelegateRelaxationLevelNone 241If Not seenReturnWithAValue AndAlso lambdaSymbol.IsAsync AndAlso delegateRelaxation < ConversionKind.DelegateRelaxationLevelWideningDropReturnOrArgs AndAlso 243delegateRelaxation = ConversionKind.DelegateRelaxationLevelWideningDropReturnOrArgs 251If delegateRelaxation <> ConversionKind.DelegateRelaxationLevelInvalid Then 273delegateRelaxation = ConversionKind.DelegateRelaxationLevelInvalid 'No conversion 279If delegateRelaxation <> ConversionKind.DelegateRelaxationLevelInvalid Then 286delegateRelaxation = ConversionKind.DelegateRelaxationLevelInvalid 'No conversion 297delegateRelaxation = CType(Math.Max(delegateRelaxation, Conversions.DetermineDelegateRelaxationLevel(methodConversions)), ConversionKind) 309delegateRelaxation = ConversionKind.DelegateRelaxationLevelInvalid 'No conversion 327Private _delegateRelaxationLevel As ConversionKind = ConversionKind.DelegateRelaxationLevelNone 342) As ConversionKind 384Dim returnRelaxation As ConversionKind = Conversions.DetermineDelegateRelaxationLevelForLambdaReturn(node.ExpressionOpt, _useSiteDiagnostics) 395Dim returnRelaxation As ConversionKind = Conversions.DetermineDelegateRelaxationLevelForLambdaReturn(node.Expression, _useSiteDiagnostics)
Binding\Binder_Operators.vb (1)
824dbNullOperand = New BoundConversion(dbNullOperand.Syntax, dbNullOperand, ConversionKind.Widening,
Binding\Binder_Statements.vb (1)
3511Dim conversionKind As ConversionKind = Conversions.ClassifyTryCastConversion(enumeratorType, idisposableType, useSiteInfo)
Binding\SyntheticBoundTrees\AnonymousTypeSyntheticMethods.vb (5)
69Dim boundTryCast As BoundExpression = New BoundTryCast(syntax, boundObjReference, ConversionKind.NarrowingReference, 151ConversionKind.WideningTypeParameter, 213ConversionKind.WideningReference, objectType, Nothing).MakeCompilerGenerated(), 304ConversionKind.WideningTypeParameter, 356ConversionKind.WideningTypeParameter, objectType, Nothing).MakeCompilerGenerated()
Binding\SyntheticBoundTrees\SynthesizedStringSwitchHashMethod.vb (2)
91textI = F.Convert(i.Type, textI, ConversionKind.WideningNumeric) 92textI = F.Convert(hashCode.Type, textI, ConversionKind.WideningNumeric)
BoundTree\BoundAddressOfOperator.vb (1)
34Friend Function GetConversionClassification(targetType As TypeSymbol) As ConversionKind
BoundTree\BoundArrayCreation.vb (1)
17Public Sub New(syntax As SyntaxNode, bounds As ImmutableArray(Of BoundExpression), initializerOpt As BoundArrayInitialization, arrayLiteralOpt As BoundArrayLiteral, arrayLiteralConversion As ConversionKind, type As TypeSymbol, Optional hasErrors As Boolean = False)
BoundTree\BoundBinaryConditionalExpression.vb (1)
41Dim conversion As ConversionKind = Conversions.ClassifyDirectCastConversion(TestExpression.Type, Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)
BoundTree\BoundConversion.vb (10)
16conversionKind As ConversionKind, 28conversionKind As ConversionKind, 44Debug.Assert((ConversionKind And VisualBasic.ConversionKind.UserDefined) = 0) 46Debug.Assert(((ConversionKind And VisualBasic.ConversionKind.UserDefined) <> 0) = (Operand.Kind = BoundKind.UserDefinedConversion)) 52If (ConversionKind And (ConversionKind.Lambda Or ConversionKind.AnonymousDelegate)) <> 0 Then 54Debug.Assert((ConversionKind And ConversionKind.AnonymousDelegate) <> 0 OrElse 58If (ConversionKind And ConversionKind.Tuple) <> 0 Then 70If (ConversionKind And VisualBasic.ConversionKind.Nullable) <> 0 Then 83If (ConversionKind And ConversionKind.UserDefined) <> 0 AndAlso
BoundTree\BoundConversionOrCast.vb (1)
8Public MustOverride ReadOnly Property ConversionKind As ConversionKind
BoundTree\BoundDirectCast.vb (3)
16conversionKind As ConversionKind, 26conversionKind As ConversionKind, 34Public Sub New(syntax As SyntaxNode, operand As BoundExpression, conversionKind As ConversionKind, constantValueOpt As ConstantValue, type As TypeSymbol, Optional hasErrors As Boolean = False)
BoundTree\BoundLambda.vb (3)
37Debug.Assert((DelegateRelaxation And (Not ConversionKind.DelegateRelaxationLevelMask)) = 0) 44(DelegateRelaxation And ConversionKind.DelegateRelaxationLevelMask) <> ConversionKind.DelegateRelaxationLevelNone)
BoundTree\BoundTryCast.vb (3)
15conversionKind As ConversionKind, 25conversionKind As ConversionKind, 33Public Sub New(syntax As SyntaxNode, operand As BoundExpression, conversionKind As ConversionKind, constantValueOpt As ConstantValue, type As TypeSymbol, Optional hasErrors As Boolean = False)
BoundTree\BoundUserDefinedConversion.vb (2)
58Debug.Assert(Conversions.ConversionExists(outConversion.ConversionKind) AndAlso (outConversion.ConversionKind And ConversionKind.UserDefined) = 0) 68Debug.Assert(Conversions.ConversionExists(inConversion.ConversionKind) AndAlso (inConversion.ConversionKind And ConversionKind.UserDefined) = 0)
CodeGen\EmitConversion.vb (1)
179If (conversion.ConversionKind And ConversionKind.Narrowing) <> 0 Then
Compilation\SemanticModel.vb (1)
944conversion = New Conversion(New KeyValuePair(Of ConversionKind, MethodSymbol)(DirectCast(lowestExpr, BoundArrayCreation).ArrayLiteralConversion, Nothing))
Compilation\VisualBasicCompilation.vb (2)
1911Return New Conversion(New KeyValuePair(Of ConversionKind, MethodSymbol)(ConversionKind.WideningNothingLiteral, Nothing))
Generated\BoundNodes.xml.Generated.vb (20)
2085Public Sub New(syntax As SyntaxNode, operand As BoundExpression, conversionKind As ConversionKind, checked As Boolean, explicitCastInCode As Boolean, constantValueOpt As ConstantValue, extendedInfoOpt As BoundExtendedConversionInfo, type As TypeSymbol, Optional hasErrors As Boolean = False) 2112Private ReadOnly _ConversionKind As ConversionKind 2113Public Overrides ReadOnly Property ConversionKind As ConversionKind 2152Public Function Update(operand As BoundExpression, conversionKind As ConversionKind, checked As Boolean, explicitCastInCode As Boolean, constantValueOpt As ConstantValue, extendedInfoOpt As BoundExtendedConversionInfo, type As TypeSymbol) As BoundConversion 2316Public Sub New(syntax As SyntaxNode, operand As BoundExpression, conversionKind As ConversionKind, suppressVirtualCalls As Boolean, constantValueOpt As ConstantValue, relaxationLambdaOpt As BoundLambda, type As TypeSymbol, Optional hasErrors As Boolean = False) 2342Private ReadOnly _ConversionKind As ConversionKind 2343Public Overrides ReadOnly Property ConversionKind As ConversionKind 2375Public Function Update(operand As BoundExpression, conversionKind As ConversionKind, suppressVirtualCalls As Boolean, constantValueOpt As ConstantValue, relaxationLambdaOpt As BoundLambda, type As TypeSymbol) As BoundDirectCast 2388Public Sub New(syntax As SyntaxNode, operand As BoundExpression, conversionKind As ConversionKind, constantValueOpt As ConstantValue, relaxationLambdaOpt As BoundLambda, type As TypeSymbol, Optional hasErrors As Boolean = False) 2413Private ReadOnly _ConversionKind As ConversionKind 2414Public Overrides ReadOnly Property ConversionKind As ConversionKind 2439Public Function Update(operand As BoundExpression, conversionKind As ConversionKind, constantValueOpt As ConstantValue, relaxationLambdaOpt As BoundLambda, type As TypeSymbol) As BoundTryCast 3956Public Sub New(syntax As SyntaxNode, isParamArrayArgument As Boolean, bounds As ImmutableArray(Of BoundExpression), initializerOpt As BoundArrayInitialization, arrayLiteralOpt As BoundArrayLiteral, arrayLiteralConversion As ConversionKind, type As TypeSymbol, Optional hasErrors As Boolean = False) 4003Private ReadOnly _ArrayLiteralConversion As ConversionKind 4004Public ReadOnly Property ArrayLiteralConversion As ConversionKind 4015Public Function Update(isParamArrayArgument As Boolean, bounds As ImmutableArray(Of BoundExpression), initializerOpt As BoundArrayInitialization, arrayLiteralOpt As BoundArrayLiteral, arrayLiteralConversion As ConversionKind, type As TypeSymbol) As BoundArrayCreation 6875Public Sub New(syntax As SyntaxNode, lambdaSymbol As LambdaSymbol, body As BoundBlock, diagnostics As ReadOnlyBindingDiagnostic(Of AssemblySymbol), lambdaBinderOpt As LambdaBodyBinder, delegateRelaxation As ConversionKind, methodConversionKind As MethodConversionKind, Optional hasErrors As Boolean = False) 6923Private ReadOnly _DelegateRelaxation As ConversionKind 6924Public ReadOnly Property DelegateRelaxation As ConversionKind 6942Public Function Update(lambdaSymbol As LambdaSymbol, body As BoundBlock, diagnostics As ReadOnlyBindingDiagnostic(Of AssemblySymbol), lambdaBinderOpt As LambdaBodyBinder, delegateRelaxation As ConversionKind, methodConversionKind As MethodConversionKind) As BoundLambda
Lowering\Diagnostics\DiagnosticsPass_ExpressionLambdas.vb (6)
324If (node.ConversionKind And ConversionKind.ConvertedToExpressionTree) <> 0 Then 328If Me.IsInExpressionLambda AndAlso (node.ConversionKind And ConversionKind.Lambda) <> 0 Then 340If (node.ConversionKind And ConversionKind.ConvertedToExpressionTree) <> 0 Then 344If Me.IsInExpressionLambda AndAlso (node.ConversionKind And ConversionKind.Lambda) <> 0 Then 356If (node.ConversionKind And ConversionKind.ConvertedToExpressionTree) <> 0 Then 360If Me.IsInExpressionLambda AndAlso (node.ConversionKind And ConversionKind.Lambda) <> 0 Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_BinaryOperator.vb (2)
552If ((conversion.ConversionKind And ConversionKind.Nullable) <> 0) AndAlso Not conversion.ExplicitCastInCode AndAlso Not operandType.IsNullableType Then 736Return New BoundConversion(oldArg.Syntax, oldArg, ConversionKind.NarrowingNullable, False, False, parameterType)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_ConditionalExpresion.vb (13)
104If (conversion.ConversionKind And ConversionKind.UserDefined) = 0 Then 110Dim convKind As ConversionKind = Conversions.ClassifyPredefinedConversion(parameterType, conversion.Operand.Type, useSiteInfo) 113If (convKind And ConversionKind.NarrowingNullable) = ConversionKind.NarrowingNullable AndAlso Not toType.IsNullableType Then 156conversionKind:=ConversionKind.Narrowing Or ConversionKind.UserDefined, 185Debug.Assert((conversion.ConversionKind And ConversionKind.UserDefined) <> 0) 203Dim innerConversion As ConversionKind = Conversions.ClassifyConversion(realParameterType, expectedParameterType, useSiteInfo).Key 208Debug.Assert((innerConversion And ConversionKind.NarrowingNullable) = ConversionKind.NarrowingNullable) 243Dim newConversionKind As ConversionKind = conversion.ConversionKind And Not ConversionKind.Nullable 246newConversionKind = newConversionKind Or ConversionKind.Nullable
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_Conversion.vb (6)
53Private Function ConvertExpression(operand As BoundExpression, conversion As ConversionKind, typeFrom As TypeSymbol, typeTo As TypeSymbol, 66Debug.Assert(conversion = ConversionKind.WideningNothingLiteral OrElse 69(conversion And (ConversionKind.Reference Or ConversionKind.Array)) <> 0) 95If (conversion And ConversionKind.UserDefined) <> 0 Then 99Return CreateUserDefinedConversion(userDefinedConversion, typeTo, (conversion And ConversionKind.Nullable) <> 0, isChecked)
Lowering\LambdaRewriter\LambdaRewriter.Analysis.vb (3)
346Return VisitLambda(lambda, (node.ConversionKind And ConversionKind.ConvertedToExpressionTree) <> 0) 357Return VisitLambda(lambda, (node.ConversionKind And ConversionKind.ConvertedToExpressionTree) <> 0) 368Return VisitLambda(lambda, (conversion.ConversionKind And ConversionKind.ConvertedToExpressionTree) <> 0)
Lowering\LambdaRewriter\LambdaRewriter.vb (4)
460New BoundDirectCast(syntaxNode, parameterExpr.MakeRValue(), ConversionKind.WideningReference, obj, Nothing), 935Dim result As BoundExpression = RewriteLambda(lambda, VisitType(node.Type), (node.ConversionKind And ConversionKind.ConvertedToExpressionTree) <> 0) 950Dim result As BoundExpression = RewriteLambda(lambda, VisitType(node.Type), (node.ConversionKind And ConversionKind.ConvertedToExpressionTree) <> 0) 965Dim result As BoundExpression = RewriteLambda(lambda, VisitType(conversion.Type), (conversion.ConversionKind And ConversionKind.ConvertedToExpressionTree) <> 0)
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.vb (2)
411Dim conversionKind As ConversionKind 427Debug.Assert((conversionKind And ConversionKind.UserDefined) = 0)
Lowering\LocalRewriter\LocalRewriter_BinaryOperators.vb (2)
606result = New BoundDirectCast(node.Syntax, op, ConversionKind.WideningValue, node.Type, Nothing) 738result = New BoundConversion(node.Syntax, DirectCast(result, BoundExpression), ConversionKind.NarrowingBoolean, node.Checked, False, node.Type)
Lowering\LocalRewriter\LocalRewriter_Call.vb (1)
27ConversionKind.WideningNumeric,
Lowering\LocalRewriter\LocalRewriter_ConditionalExpressions.vb (3)
32If Conversions.IsWideningConversion(conversion) AndAlso Conversions.IsCLRPredefinedConversion(conversion) AndAlso ((conversion And ConversionKind.TypeParameter) = 0) Then 138ConversionKind.WideningNullable, 150ConversionKind.WideningNullable,
Lowering\LocalRewriter\LocalRewriter_Conversion.vb (46)
23ConversionKind.Identity, 45If (node.ConversionKind And ConversionKind.Nullable) <> 0 Then 61If (node.ConversionKind And ConversionKind.AnonymousDelegate) <> 0 Then 106If (node.ConversionKind And (ConversionKind.Lambda Or ConversionKind.ConvertedToExpressionTree)) = (ConversionKind.Lambda Or ConversionKind.ConvertedToExpressionTree) Then 113ElseIf (node.ConversionKind And ConversionKind.InterpolatedString) = ConversionKind.InterpolatedString Then 116ElseIf (node.ConversionKind And (ConversionKind.Tuple Or ConversionKind.Nullable)) = ConversionKind.Tuple Then 160Return conversion.ConversionKind = ConversionKind.Identity AndAlso Not conversion.ExplicitCastInCode 444ConversionKind.WideningNothingLiteral, 464node.ConversionKind And (Not ConversionKind.Nullable), 537Debug.Assert((convKind And ConversionKind.Tuple) = (node.ConversionKind And ConversionKind.Tuple)) 553If (convKind And ConversionKind.Tuple) <> 0 Then 720Debug.Assert(rewrittenConversion.ConversionKind = ConversionKind.WideningNothingLiteral OrElse 723(rewrittenConversion.ConversionKind And (ConversionKind.Reference Or ConversionKind.Array)) <> 0) 822(node.ConversionKind And (Not ConversionKind.DelegateRelaxationLevelMask)) = 898Dim conv = ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions 964Dim conv As ConversionKind 967conv = ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions 969conv = ConversionKind.WideningNumeric 1042Dim conv = ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions 1103Dim conv As ConversionKind 1106conv = ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions 1108conv = ConversionKind.WideningNumeric 1179Dim conv = ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions 1218Debug.Assert(ConversionKind.WideningNumeric = Conversions.ClassifyConversion(typeFrom, mathRound.Parameters(0).Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key) 1220operand = New BoundConversion(node.Syntax, operand, ConversionKind.WideningNumeric, node.Checked, node.ExplicitCastInCode, 1294If (node.ConversionKind And (ConversionKind.Lambda Or ConversionKind.ConvertedToExpressionTree)) = (ConversionKind.Lambda Or ConversionKind.ConvertedToExpressionTree) Then 1320If (node.ConversionKind And (ConversionKind.Lambda Or ConversionKind.ConvertedToExpressionTree)) = (ConversionKind.Lambda Or ConversionKind.ConvertedToExpressionTree) Then
Lowering\LocalRewriter\LocalRewriter_DelegateCreation.vb (2)
45ConversionKind.Lambda Or ConversionKind.Widening,
Lowering\LocalRewriter\LocalRewriter_InterpolatedString.vb (2)
57Debug.Assert((conversion.ConversionKind And ConversionKind.InterpolatedString) = ConversionKind.InterpolatedString)
Lowering\LocalRewriter\LocalRewriter_LateAddressOf.vb (2)
142ConversionKind.DelegateRelaxationLevelWidening, 148ConversionKind.DelegateRelaxationLevelWidening,
Lowering\LocalRewriter\LocalRewriter_NullableHelpers.vb (5)
230Return (conversion.ConversionKind And (ConversionKind.Widening Or ConversionKind.Nullable Or ConversionKind.UserDefined)) = (ConversionKind.Widening Or ConversionKind.Nullable) AndAlso
Lowering\LocalRewriter\LocalRewriter_ObjectCreation.vb (1)
43Dim conv As ConversionKind = Conversions.ClassifyDirectCastConversion(result.Type, node.Type, useSiteInfo)
Lowering\LocalRewriter\LocalRewriter_Query.vb (1)
209ConversionKind.DelegateRelaxationLevelNone,
Lowering\LocalRewriter\LocalRewriter_With.vb (1)
121ConversionKind.WideningNothingLiteral,
Lowering\SyntheticBoundNodeFactory.vb (5)
644ConversionKind.WideningNothingLiteral, 1016Return Convert(type, arg, ConversionKind.WideningNothingLiteral, isChecked) 1018Return Convert(type, arg, ConversionKind.WideningReference, isChecked) ' will abort before code gen due to error, so doesn't matter if conversion kind is wrong. 1024Public Function Convert(type As TypeSymbol, arg As BoundExpression, convKind As ConversionKind, Optional isChecked As Boolean = False) As BoundConversion 1025Debug.Assert((convKind And ConversionKind.UserDefined) = 0)
Operations\VisualBasicOperationFactory_Methods.vb (1)
578If conversionKind.HasFlag(VisualBasic.ConversionKind.UserDefined) AndAlso conversion.Operand.Kind = BoundKind.UserDefinedConversion Then
Semantics\Conversions.vb (506)
21Private ReadOnly _convKind As ConversionKind 24Friend Sub New(conv As KeyValuePair(Of ConversionKind, MethodSymbol)) 29Friend ReadOnly Property Kind As ConversionKind 84Return (_convKind And ConversionKind.WideningNothingLiteral) = ConversionKind.WideningNothingLiteral 94Return (_convKind And ConversionKind.Numeric) <> 0 103Return (_convKind And ConversionKind.Boolean) <> 0 113Return (_convKind And ConversionKind.Reference) <> 0 123Return (_convKind And ConversionKind.AnonymousDelegate) <> 0 132Return (_convKind And ConversionKind.Lambda) <> 0 142Return (_convKind And ConversionKind.Array) <> 0 152Return (_convKind And ConversionKind.Value) <> 0 162Return (_convKind And ConversionKind.Nullable) <> 0 172Return (_convKind And ConversionKind.String) <> 0 182Return (_convKind And ConversionKind.TypeParameter) <> 0 196Return (_convKind And ConversionKind.UserDefined) <> 0 278If _convKind = ConversionKind.DelegateRelaxationLevelNone Then 319''' Can be combined with <see cref="ConversionKind.Tuple"/> to indicate that the underlying value conversion is a predefined tuple conversion 405''' Can be combined with <see cref="ConversionKind.Nullable"/> to indicate that the underlying value conversion is a predefined tuple conversion 465Public Shared ReadOnly Identity As New KeyValuePair(Of ConversionKind, MethodSymbol)(ConversionKind.Identity, Nothing) 481Const IDN As Integer = ConversionKind.Identity 482Const NUM As Integer = ConversionKind.WideningNumeric 483Const NNM As Integer = ConversionKind.NarrowingNumeric 484Const IRF As Integer = ConversionKind.WideningReference 485Const NRF As Integer = ConversionKind.NarrowingReference 486Const WIV As Integer = ConversionKind.WideningValue 487Const NAV As Integer = ConversionKind.NarrowingValue 488Const NST As Integer = ConversionKind.NarrowingString 489Const WST As Integer = ConversionKind.WideningString 490Const NBO As Integer = ConversionKind.NarrowingBoolean 516Public Shared Function ClassifyPredefinedConversion(source As TypeSymbol, target As TypeSymbol) As ConversionKind? 562Return ConversionKind.WideningValue 567Return ConversionKind.NarrowingValue 571Dim conv As ConversionKind = CType(s_convkind(sourceIndex.Value, targetIndex.Value), ConversionKind) 598conv = ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions 604conv = conv Or ConversionKind.InvolvesEnumTypeConversions 605If (conv And ConversionKind.Identity) <> 0 Then 606conv = (conv And Not ConversionKind.Identity) Or ConversionKind.Widening Or ConversionKind.Numeric 612conv = conv Or ConversionKind.InvolvesEnumTypeConversions 619conv = (conv And Not ConversionKind.Widening) Or ConversionKind.Narrowing Or ConversionKind.InvolvesEnumTypeConversions 620If (conv And ConversionKind.Identity) <> 0 Then 621conv = (conv And Not ConversionKind.Identity) Or ConversionKind.Numeric 625Debug.Assert(Conversions.IsIdentityConversion(conv) OrElse (conv And ConversionKind.InvolvesEnumTypeConversions) <> 0) 651conv = ConversionKind.NarrowingNullable 655conv = ConversionKind.WideningNullable 663conv = ConversionKind.NarrowingNullable 672conv = ConversionKind.WideningNullable 676conv = ConversionKind.NarrowingNullable 685Private Shared Function FastClassifyPredefinedConversion(source As TypeSymbol, target As TypeSymbol) As ConversionKind? 870conversion As ConversionKind, 885conversion As ConversionKind, 897If conversion = ConversionKind.WideningNothingLiteral OrElse 899(conversion And ConversionKind.WideningReference) = ConversionKind.WideningReference OrElse 900(conversion And ConversionKind.WideningArray) = ConversionKind.WideningArray Then 910Public Shared Function ClassifyConversion(source As TypeSymbol, destination As TypeSymbol, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As KeyValuePair(Of ConversionKind, MethodSymbol) 917Dim predefinedConversion As ConversionKind = ClassifyPredefinedConversion(source, destination, useSiteInfo) 920Return New KeyValuePair(Of ConversionKind, MethodSymbol)(predefinedConversion, Nothing) 930Public Shared Function ClassifyPredefinedConversion(source As BoundExpression, destination As TypeSymbol, binder As Binder, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 940) As ConversionKind 946Dim conv As ConversionKind 1001Dim predefinedConversion As ConversionKind = ClassifyPredefinedConversion(sourceType, destination, useSiteInfo) 1016Public Shared Function ClassifyConversion(source As BoundExpression, destination As TypeSymbol, binder As Binder, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As KeyValuePair(Of ConversionKind, MethodSymbol) 1021Dim conv As ConversionKind 1026(conv And (ConversionKind.Lambda Or ConversionKind.FailedDueToArrayLiteralElementConversion)) <> 0 Then 1027Return New KeyValuePair(Of ConversionKind, MethodSymbol)(conv, Nothing) 1034Return New KeyValuePair(Of ConversionKind, MethodSymbol)(conv, Nothing) 1046Private Shared Function ClassifyExpressionReclassification(source As BoundExpression, destination As TypeSymbol, binder As Binder, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 1080Private Shared Function ClassifyUnboundLambdaConversion(source As UnboundLambda, destination As TypeSymbol) As ConversionKind 1081Dim leastRelaxationLevel As ConversionKind = ConversionKind.DelegateRelaxationLevelNone 1082Dim conversionKindExpressionTree As ConversionKind = Nothing ' Set to ConversionKind.ConvertedToExpressionTree if expression tree involved. 1089leastRelaxationLevel = ConversionKind.DelegateRelaxationLevelWideningToNonLambda 1096Return ConversionKind.Lambda ' No conversion 1107conversionKindExpressionTree = ConversionKind.ConvertedToExpressionTree 1111Return ConversionKind.Lambda Or conversionKindExpressionTree ' No conversion 1119Return ConversionKind.Lambda Or conversionKindExpressionTree ' No conversion 1129bound.DelegateRelaxation = ConversionKind.DelegateRelaxationLevelInvalid) 1131If bound.DelegateRelaxation = ConversionKind.DelegateRelaxationLevelInvalid Then 1132Return ConversionKind.Lambda Or ConversionKind.DelegateRelaxationLevelInvalid Or conversionKindExpressionTree ' No conversion 1135Return ConversionKind.Lambda Or conversionKindExpressionTree Or 1136If(IsNarrowingMethodConversion(bound.MethodConversionKind, isForAddressOf:=False), ConversionKind.Narrowing, ConversionKind.Widening) Or 1137CType(Math.Max(bound.DelegateRelaxation, leastRelaxationLevel), ConversionKind) 1140Public Shared Function ClassifyArrayLiteralConversion(source As BoundArrayLiteral, destination As TypeSymbol, binder As Binder, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 1194Dim conv As ConversionKind = ClassifyStringConversion(sourceType, destination) 1220Return ConversionKind.Narrowing 1226Public Shared Function ClassifyInterpolatedStringConversion(source As BoundInterpolatedStringExpression, destination As TypeSymbol, binder As Binder) As ConversionKind 1232Return ConversionKind.InterpolatedString 1239Public Shared Function ClassifyTupleConversion(source As BoundTupleLiteral, destination As TypeSymbol, binder As Binder, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 1241Return ConversionKind.Identity 1246Dim wideningConversion = ConversionKind.WideningTuple 1247Dim narrowingConversion = ConversionKind.NarrowingTuple 1252wideningConversion = ConversionKind.WideningNullableTuple 1253narrowingConversion = ConversionKind.NarrowingNullableTuple 1272Dim result As ConversionKind = wideningConversion 1276Dim involvesNarrowingFromNumericConstant As ConversionKind = Nothing 1277Dim allNarrowingIsFromNumericConstant = ConversionKind.InvolvesNarrowingFromNumericConstant 1279Dim maxDelegateRelaxationLevel = ConversionKind.DelegateRelaxationLevelNone 1295Dim elementDelegateRelaxationLevel = elementConversion And ConversionKind.DelegateRelaxationLevelMask 1308Debug.Assert((allNarrowingIsFromNumericConstant And Not ConversionKind.InvolvesNarrowingFromNumericConstant) = 0) 1312Private Shared Function ClassifyArrayInitialization(source As BoundArrayInitialization, targetElementType As TypeSymbol, binder As Binder, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 1318Return ConversionKind.FailedDueToArrayLiteralElementConversion 1321Dim result = ConversionKind.Widening 1322Dim mergedInvolvesNarrowingFromNumericConstant As ConversionKind = ConversionKind.InvolvesNarrowingFromNumericConstant 1328Dim elementConv As ConversionKind 1337result = ConversionKind.Narrowing 1344result = ConversionKind.FailedDueToArrayLiteralElementConversion 1349If IsWideningConversion(result) AndAlso (elementConv And ConversionKind.InvolvesNarrowingFromNumericConstant) <> 0 Then 1353Debug.Assert((mergedInvolvesNarrowingFromNumericConstant And ConversionKind.InvolvesNarrowingFromNumericConstant) <> 0) 1365Private Shared Function ClassifyAddressOfConversion(source As BoundAddressOfOperator, destination As TypeSymbol) As ConversionKind 1369Private Shared Function ClassifyQueryLambdaConversion(source As BoundQueryLambda, destination As TypeSymbol, binder As Binder, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 1378Dim conversionKindExpressionTree As ConversionKind = If(wasExpressionTree, ConversionKind.ConvertedToExpressionTree, Nothing) 1407Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) 1416Return conv.Key And (Not ConversionKind.Identity) Or (ConversionKind.Widening Or ConversionKind.Lambda) Or conversionKindExpressionTree 1418Return conv.Key Or (ConversionKind.Lambda Or ConversionKind.FailedDueToQueryLambdaBodyMismatch) Or conversionKindExpressionTree 1420Debug.Assert(((conv.Key And ConversionKind.UserDefined) <> 0) = (conv.Value IsNot Nothing)) 1421Return (conv.Key And (Not (ConversionKind.UserDefined Or ConversionKind.Nullable Or ConversionKind.Tuple))) Or ConversionKind.Lambda Or conversionKindExpressionTree 1425Return ConversionKind.Widening Or ConversionKind.Lambda Or conversionKindExpressionTree 1438) As KeyValuePair(Of ConversionKind, MethodSymbol) 1460Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.ClassifyConversion(operand, booleanType, binder, useSiteInfo) 1474Dim convToNullableOfBoolean As KeyValuePair(Of ConversionKind, MethodSymbol) = Nothing 1513Return New KeyValuePair(Of ConversionKind, MethodSymbol)(ConversionKind.Widening, Nothing) 1515Not ((convToNullableOfBoolean.Key And (ConversionKind.UserDefined Or ConversionKind.Nullable)) = 1516ConversionKind.UserDefined AndAlso 1530Private Shared Function ClassifyGroupTypeInferenceLambdaConversion(source As GroupTypeInferenceLambda, destination As TypeSymbol) As ConversionKind 1582Return (ConversionKind.Widening Or ConversionKind.Lambda) 1585Private Shared Function ClassifyNumericConstantConversion(constantExpression As BoundExpression, destination As TypeSymbol, binder As Binder) As ConversionKind 1600Return ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions 1603Return ConversionKind.NarrowingNullable Or ConversionKind.InvolvesNarrowingFromNumericConstant 1616Return ConversionKind.Identity 1619Dim conv As ConversionKind = Nothing 'ConversionKind.NoConversions 1635conv = conv Or ConversionKind.InvolvesNarrowingFromNumericConstant 1646conv = (conv And (Not ConversionKind.Narrowing)) Or ConversionKind.Widening 1652Return ConversionKind.FailedDueToIntegerOverflow 1667conv = conv Or ConversionKind.InvolvesNarrowingFromNumericConstant 1687conv = ConversionKind.FailedDueToNumericOverflow 1691Return ConversionKind.FailedDueToIntegerOverflow 1699Private Shared Function ClassifyNothingLiteralConversion(constantExpression As BoundExpression, destination As TypeSymbol) As ConversionKind 1709Return ConversionKind.Identity 1712Return ConversionKind.WideningNothingLiteral 1722) As ConversionKind 1733Dim result As ConversionKind 1747Return ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions 1752Return ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions 1759Return ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions 1787Public Shared Function ClassifyDirectCastConversion(source As BoundExpression, destination As TypeSymbol, binder As Binder, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 1792Dim conv As ConversionKind 1804If ConversionExists(conv) OrElse (conv And (ConversionKind.Lambda Or ConversionKind.FailedDueToArrayLiteralElementConversion)) <> 0 Then 1826Public Shared Function ClassifyTryCastConversion(source As TypeSymbol, destination As TypeSymbol, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 1833Dim result As ConversionKind 1843Public Shared Function ClassifyTryCastConversion(source As BoundExpression, destination As TypeSymbol, binder As Binder, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 1848Dim conv As ConversionKind 1860If ConversionExists(conv) OrElse (conv And (ConversionKind.Lambda Or ConversionKind.FailedDueToArrayLiteralElementConversion)) <> 0 Then 1882Private Shared Function ClassifyTryCastConversionForTypeParameters(source As TypeSymbol, destination As TypeSymbol, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 1975Return ConversionKind.Narrowing 1983Dim conv As ConversionKind = ClassifyDirectCastConversion(src, dst, useSiteInfo) 1986Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 2001Return ConversionKind.Narrowing Or (conv And ConversionKind.InvolvesEnumTypeConversions) 2008Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 2023Return ConversionKind.Narrowing Or (conv And ConversionKind.InvolvesEnumTypeConversions) 2084Private Shared Function ClassifyUserDefinedConversion(source As TypeSymbol, destination As TypeSymbol, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As KeyValuePair(Of ConversionKind, MethodSymbol) 2108Private Shared Function ClassifyUserDefinedConversion(source As BoundExpression, destination As TypeSymbol, binder As Binder, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As KeyValuePair(Of ConversionKind, MethodSymbol) 2132Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) = ClassifyUserDefinedConversion(sourceType, destination, useSiteInfo) 2142Dim inConversion As ConversionKind 2159conv = New KeyValuePair(Of ConversionKind, MethodSymbol)((conv.Key And Not ConversionKind.Narrowing) Or 2160(inConversion And ConversionKind.FailedDueToNumericOverflowMask), 2171If (inConversion And ConversionKind.InvolvesNarrowingFromNumericConstant) <> 0 AndAlso 2175Dim newConv As ConversionKind = conv.Key Or ConversionKind.InvolvesNarrowingFromNumericConstant 2179newConv = (newConv And Not ConversionKind.Narrowing) Or ConversionKind.Widening 2182conv = New KeyValuePair(Of ConversionKind, MethodSymbol)(newConv, conv.Value) 2193Public Shared Function ClassifyPredefinedConversion(source As TypeSymbol, destination As TypeSymbol, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 2209Private Shared Function ClassifyPredefinedConversionSlow(source As TypeSymbol, destination As TypeSymbol, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 2211Dim result As ConversionKind 2267Private Shared Function AddDelegateRelaxationInformationForADelegate(source As TypeSymbol, destination As TypeSymbol, convKind As ConversionKind) As ConversionKind 2268Debug.Assert((convKind And ConversionKind.DelegateRelaxationLevelMask) = 0) 2273convKind = convKind And (Not ConversionKind.DelegateRelaxationLevelMask) 2276Return convKind Or ConversionKind.DelegateRelaxationLevelInvalid 2281Return convKind Or ConversionKind.DelegateRelaxationLevelWideningToNonLambda 2283Return convKind Or ConversionKind.DelegateRelaxationLevelWidening 2287Return convKind Or ConversionKind.DelegateRelaxationLevelNarrowing 2294Private Shared Function ClassifyIdentityConversion(source As TypeSymbol, destination As TypeSymbol) As ConversionKind 2302Return ConversionKind.Identity 2314) As ConversionKind 2352Return ConversionKind.WideningReference 2358Return ConversionKind.NarrowingReference 2361Dim conv As ConversionKind = ClassifyReferenceConversionFromArrayToAnInterface(destination, source, varianceCompatibilityClassificationDepth, useSiteInfo) 2368Return ConversionKind.NarrowingReference Or (conv And ConversionKind.InvolvesEnumTypeConversions) 2378Dim conv As ConversionKind = ToInterfaceConversionClassifier.ClassifyConversionToVariantCompatibleInterface(DirectCast(source, NamedTypeSymbol), 2386Debug.Assert((conv And Not (ConversionKind.Widening Or ConversionKind.Narrowing Or 2387ConversionKind.InvolvesEnumTypeConversions Or 2388ConversionKind.VarianceConversionAmbiguity)) = 0) 2389Return conv Or ConversionKind.Reference 2396Return ConversionKind.NarrowingReference 2410Return ConversionKind.WideningReference 2414Return ConversionKind.NarrowingReference 2418Dim conv As ConversionKind = ClassifyConversionToVariantCompatibleDelegateType(DirectCast(source, NamedTypeSymbol), 2424Debug.Assert((conv And Not (ConversionKind.Widening Or ConversionKind.Narrowing Or 2425ConversionKind.InvolvesEnumTypeConversions Or 2426ConversionKind.NarrowingDueToContraVarianceInDelegate)) = 0) 2427Return conv Or ConversionKind.Reference 2428ElseIf (conv And ConversionKind.MightSucceedAtRuntime) <> 0 Then 2429Return ConversionKind.MightSucceedAtRuntime 2444) As ConversionKind 2455Return ConversionKind.WideningReference 2497Return ConversionKind.WideningReference 2500Dim conv As ConversionKind = ClassifyArrayConversionBasedOnElementTypes(arrayElement, dstUnderlyingElement, varianceCompatibilityClassificationDepth, useSiteInfo) 2502Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 2503Return ConversionKind.WideningReference Or (conv And ConversionKind.InvolvesEnumTypeConversions) 2505Return ConversionKind.NarrowingReference Or 2506(conv And (ConversionKind.InvolvesEnumTypeConversions Or ConversionKind.VarianceConversionAmbiguity)) 2512Return ConversionKind.NarrowingReference 2520Dim conv As ConversionKind = ClassifyDirectCastConversion(source, destination, useSiteInfo) 2523(conv And ConversionKind.InvolvesEnumTypeConversions) = 0 Then 2535) As ConversionKind 2539Const validBits As ConversionKind = (ConversionKind.Widening Or ConversionKind.Narrowing Or 2540ConversionKind.InvolvesEnumTypeConversions Or 2541ConversionKind.VarianceConversionAmbiguity Or 2542ConversionKind.MightSucceedAtRuntime Or 2543ConversionKind.NarrowingDueToContraVarianceInDelegate) 2545Dim forwardConv As ConversionKind = ClassifyImmediateVarianceCompatibility(source, destination, varianceCompatibilityClassificationDepth, useSiteInfo) 2552Dim backwardConv As ConversionKind = ClassifyImmediateVarianceCompatibility(destination, source, varianceCompatibilityClassificationDepth, useSiteInfo) 2556Return (backwardConv And Not (ConversionKind.Widening Or ConversionKind.NarrowingDueToContraVarianceInDelegate)) Or ConversionKind.Narrowing 2559Return ((forwardConv Or backwardConv) And ConversionKind.MightSucceedAtRuntime) 2567Private _conv As ConversionKind 2570Public ReadOnly Property Result As ConversionKind 2573Return ConversionKind.Widening 2578(_conv = ConversionKind.Widening OrElse 2579_conv = ConversionKind.Narrowing OrElse 2580_conv = (ConversionKind.Widening Or ConversionKind.InvolvesEnumTypeConversions) OrElse 2581_conv = (ConversionKind.Narrowing Or ConversionKind.InvolvesEnumTypeConversions) OrElse 2582_conv = (ConversionKind.Narrowing Or ConversionKind.VarianceConversionAmbiguity)))) 2598) As ConversionKind 2654Dim addConv As ConversionKind = ClassifyImmediateVarianceCompatibility(source, destination, varianceCompatibilityClassificationDepth, useSiteInfo) 2656Debug.Assert((addConv And ConversionKind.NarrowingDueToContraVarianceInDelegate) = 0) 2658If (addConv And ConversionKind.MightSucceedAtRuntime) <> 0 Then 2660addConv = ConversionKind.Narrowing Or (addConv And (ConversionKind.InvolvesEnumTypeConversions Or ConversionKind.VarianceConversionAmbiguity)) 2663Const validNonidentityBits As ConversionKind = (ConversionKind.Widening Or ConversionKind.Narrowing Or 2664ConversionKind.InvolvesEnumTypeConversions Or 2665ConversionKind.VarianceConversionAmbiguity) 2671_conv = ConversionKind.Identity 2678If (_conv And ConversionKind.VarianceConversionAmbiguity) <> 0 Then 2683_conv = ConversionKind.Narrowing Or ConversionKind.VarianceConversionAmbiguity 2703) As ConversionKind 2726Return ConversionKind.Narrowing 2758Dim involvesEnumTypeConversions As ConversionKind = Nothing 2759Dim varianceConversionAmbiguity As ConversionKind = ConversionKind.VarianceConversionAmbiguity 2786Dim conv As ConversionKind = Nothing 2793(conv And ConversionKind.NarrowingDueToContraVarianceInDelegate) <> 0 Then 2817If (conv And ConversionKind.MightSucceedAtRuntime) = 0 Then 2824If (conv And ConversionKind.InvolvesEnumTypeConversions) <> 0 Then 2825involvesEnumTypeConversions = ConversionKind.InvolvesEnumTypeConversions 2833Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 2845Return ConversionKind.Identity 2848Return ConversionKind.MightSucceedAtRuntime Or varianceConversionAmbiguity Or involvesEnumTypeConversions 2851Return ConversionKind.Narrowing Or ConversionKind.NarrowingDueToContraVarianceInDelegate Or involvesEnumTypeConversions 2853Return ConversionKind.Widening Or involvesEnumTypeConversions 2943Private Shared Function ClassifyAnonymousDelegateConversion(source As TypeSymbol, destination As TypeSymbol, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 2966Dim additionalFlags As ConversionKind = DetermineDelegateRelaxationLevel(methodConversion) 2969additionalFlags = additionalFlags Or ConversionKind.NeedAStub 2980Return ConversionKind.AnonymousDelegate Or ConversionKind.Narrowing Or additionalFlags 2982Return ConversionKind.AnonymousDelegate Or ConversionKind.Widening Or additionalFlags 2994) As ConversionKind 3037Public Shared Function ClassifyArrayElementConversion(srcElem As TypeSymbol, dstElem As TypeSymbol, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 3039Dim result As ConversionKind 3055) As ConversionKind 3058If NoConversion(conv) AndAlso (conv And ConversionKind.MightSucceedAtRuntime) = 0 Then 3061If NoConversion(conv) AndAlso (conv And ConversionKind.MightSucceedAtRuntime) = 0 Then 3079) As ConversionKind 3111Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 3117Return ConversionKind.WideningArray Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3135Return ConversionKind.WideningArray Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3144Return ConversionKind.NarrowingArray Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3152Return ConversionKind.NarrowingArray Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3162Return ConversionKind.NarrowingArray Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3169Return ConversionKind.NarrowingArray Or 3170(conv And (ConversionKind.InvolvesEnumTypeConversions Or ConversionKind.VarianceConversionAmbiguity)) 3172ElseIf (conv And ConversionKind.MightSucceedAtRuntime) <> 0 Then 3174Return ConversionKind.MightSucceedAtRuntime 3186Dim mightSucceedAtRuntime As ConversionKind = Nothing 3192Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 3197Return ConversionKind.WideningArray Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3201Return ConversionKind.NarrowingArray Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3204If (conv And ConversionKind.MightSucceedAtRuntime) <> 0 Then 3205mightSucceedAtRuntime = ConversionKind.MightSucceedAtRuntime 3242Return ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions 3249Return ConversionKind.WideningArray Or ConversionKind.InvolvesEnumTypeConversions 3252Return ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions 3260Return ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions 3275mightSucceedAtRuntime = ConversionKind.MightSucceedAtRuntime 3290Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 3291Return ConversionKind.NarrowingArray Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3296If (conv And ConversionKind.MightSucceedAtRuntime) <> 0 Then 3297Return ConversionKind.MightSucceedAtRuntime 3303Return ConversionKind.MightSucceedAtRuntime 3320Return ConversionKind.NarrowingArray Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3325If (conv And ConversionKind.MightSucceedAtRuntime) <> 0 Then 3326Return ConversionKind.MightSucceedAtRuntime 3330Return ConversionKind.MightSucceedAtRuntime 3376Private Shared Function ClassifyValueTypeConversion(source As TypeSymbol, destination As TypeSymbol, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 3397Return ConversionKind.WideningValue ' Shortcut 3403Return ConversionKind.WideningValue 3408Dim conv As ConversionKind = ToInterfaceConversionClassifier.ClassifyConversionToVariantCompatibleInterface( 3418Debug.Assert((conv And Not (ConversionKind.Widening Or ConversionKind.Narrowing Or 3419ConversionKind.InvolvesEnumTypeConversions Or 3420ConversionKind.VarianceConversionAmbiguity)) = 0) 3421Return conv Or ConversionKind.Value 3430Return ConversionKind.NarrowingValue ' Shortcut 3436Return ConversionKind.NarrowingValue 3447Return ConversionKind.NarrowingValue 3457Private Shared Function ClassifyNullableConversion(source As TypeSymbol, destination As TypeSymbol, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 3495Const preserveConversionKindFromUnderlyingPredefinedConversion As ConversionKind = ConversionKind.Tuple Or ConversionKind.DelegateRelaxationLevelMask 3499Dim conv As ConversionKind 3504Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 3505Debug.Assert((conv And ConversionKind.DelegateRelaxationLevelMask) = 0 OrElse (conv And ConversionKind.Tuple) <> 0) 3509Return ConversionKind.WideningNullable Or (conv And preserveConversionKindFromUnderlyingPredefinedConversion) 3512Return ConversionKind.NarrowingNullable Or (conv And preserveConversionKindFromUnderlyingPredefinedConversion) 3519Debug.Assert((conv And ConversionKind.Tuple) = 0) 3523Return ConversionKind.WideningNullable 3526Return ConversionKind.NarrowingNullable 3531Return ConversionKind.NarrowingNullable 3534Debug.Assert((conv And ConversionKind.DelegateRelaxationLevelMask) = 0 OrElse (conv And ConversionKind.Tuple) <> 0) 3538Return ConversionKind.NarrowingNullable Or (conv And preserveConversionKindFromUnderlyingPredefinedConversion) 3548Return ConversionKind.WideningNullable 3552Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 3553Debug.Assert((conv And ConversionKind.DelegateRelaxationLevelMask) = 0 OrElse (conv And ConversionKind.Tuple) <> 0) 3557Return ConversionKind.WideningNullable Or (conv And preserveConversionKindFromUnderlyingPredefinedConversion) 3560Return ConversionKind.NarrowingNullable Or (conv And preserveConversionKindFromUnderlyingPredefinedConversion) 3568Private Shared Function ClassifyTupleConversion(source As TypeSymbol, destination As TypeSymbol, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ConversionKind 3585Dim result As ConversionKind = ConversionKind.WideningTuple 3586Dim maxDelegateRelaxationLevel = ConversionKind.DelegateRelaxationLevelNone 3602Debug.Assert((elementConversion And ConversionKind.InvolvesNarrowingFromNumericConstant) = 0) 3603Dim elementDelegateRelaxationLevel = elementConversion And ConversionKind.DelegateRelaxationLevelMask 3609result = ConversionKind.NarrowingTuple 3616Public Shared Function ClassifyStringConversion(source As TypeSymbol, destination As TypeSymbol) As ConversionKind 3637Return ConversionKind.WideningString 3639Return ConversionKind.NarrowingString 3652) As ConversionKind 3676Dim conv As ConversionKind 3696Return ConversionKind.MightSucceedAtRuntime 3707) As ConversionKind 3711Return ConversionKind.WideningTypeParameter 3715Dim result As ConversionKind = ClassifyConversionFromTypeParameter(typeParameter, destination, queue, varianceCompatibilityClassificationDepth, useSiteInfo) 3730) As ConversionKind 3753Return ConversionKind.WideningTypeParameter 3765Return ConversionKind.WideningTypeParameter 3783Return ConversionKind.WideningTypeParameter 3788Return ConversionKind.WideningTypeParameter Or ConversionKind.InvolvesEnumTypeConversions 3815Return ConversionKind.WideningTypeParameter 3820Dim conv As ConversionKind = ClassifyReferenceConversionFromArrayToAnInterface(constraint, destination, varianceCompatibilityClassificationDepth, useSiteInfo) 3824Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 3825Return ConversionKind.WideningTypeParameter Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3833Return ConversionKind.WideningTypeParameter 3838Dim conv As ConversionKind = ClassifyArrayConversion(constraint, destination, varianceCompatibilityClassificationDepth, useSiteInfo) 3842Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 3843Return ConversionKind.WideningTypeParameter Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3877Dim conv As ConversionKind = convToInterface.Result 3885Debug.Assert((conv And Not (ConversionKind.Widening Or ConversionKind.Narrowing Or 3886ConversionKind.InvolvesEnumTypeConversions Or 3887ConversionKind.VarianceConversionAmbiguity)) = 0) 3888Return ConversionKind.TypeParameter Or conv 3893Return ConversionKind.NarrowingTypeParameter 3904) As ConversionKind 3907Return ConversionKind.NarrowingTypeParameter 3913Return ConversionKind.NarrowingTypeParameter 3921Return ConversionKind.NarrowingTypeParameter 3935Return ConversionKind.NarrowingTypeParameter 3947Return ConversionKind.NarrowingTypeParameter 3952Return ConversionKind.NarrowingTypeParameter Or ConversionKind.InvolvesEnumTypeConversions 3969Return ConversionKind.NarrowingTypeParameter 3978Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0) 3979Return ConversionKind.NarrowingTypeParameter Or (conv And ConversionKind.InvolvesEnumTypeConversions) 3991Dim conv As ConversionKind = ClassifyTypeParameterConversion(source, constraint, varianceCompatibilityClassificationDepth, useSiteInfo) 3997Return ConversionKind.NarrowingTypeParameter Or (conv And ConversionKind.InvolvesEnumTypeConversions) 4074Dim typeConversion As ConversionKind = ClassifyConversion(returnTypeOfConvertFromMethod, returnTypeOfConvertToMethod, useSiteInfo).Key 4092(typeConversion And ConversionKind.UserDefined) <> 0 Then 4125conversion As ConversionKind, 4234) As ConversionKind 4237Return ConversionKind.DelegateRelaxationLevelNone 4243Return ConversionKind.DelegateRelaxationLevelNone 4272) As ConversionKind 4273Dim result As ConversionKind 4276result = ConversionKind.DelegateRelaxationLevelNone 4279result = ConversionKind.DelegateRelaxationLevelInvalid 4282result = ConversionKind.DelegateRelaxationLevelNarrowing 4285result = ConversionKind.DelegateRelaxationLevelWidening 4288result = ConversionKind.DelegateRelaxationLevelWideningDropReturnOrArgs 4439Public Shared Function IsWideningConversion(conv As ConversionKind) As Boolean 4441((conv And ConversionKind.Widening) <> 0) <> ((conv And ConversionKind.Narrowing) <> 0)) 4442Return (conv And ConversionKind.Widening) <> 0 4445Public Shared Function IsNarrowingConversion(conv As ConversionKind) As Boolean 4447((conv And ConversionKind.Widening) <> 0) <> ((conv And ConversionKind.Narrowing) <> 0)) 4448Return (conv And ConversionKind.Narrowing) <> 0 4451Public Shared Function NoConversion(conv As ConversionKind) As Boolean 4452Return (conv And (ConversionKind.Narrowing Or ConversionKind.Widening)) = 0 4455Public Shared Function ConversionExists(conv As ConversionKind) As Boolean 4456Return (conv And (ConversionKind.Narrowing Or ConversionKind.Widening)) <> 0 4459Public Shared Function IsIdentityConversion(conv As ConversionKind) As Boolean 4461((conv And ConversionKind.Widening) <> 0) <> ((conv And ConversionKind.Narrowing) <> 0)) 4462Return (conv And ConversionKind.Identity) = ConversionKind.Identity 4465Public Shared Function FailedDueToNumericOverflow(conv As ConversionKind) As Boolean 4466Return (conv And (ConversionKind.Narrowing Or ConversionKind.Widening Or ConversionKind.FailedDueToNumericOverflow)) = ConversionKind.FailedDueToNumericOverflow 4469Public Shared Function FailedDueToQueryLambdaBodyMismatch(conv As ConversionKind) As Boolean 4470Return (conv And (ConversionKind.Narrowing Or ConversionKind.Widening Or ConversionKind.FailedDueToQueryLambdaBodyMismatch)) = ConversionKind.FailedDueToQueryLambdaBodyMismatch 4479Public Shared Function IsCLRPredefinedConversion(conversion As ConversionKind) As Boolean 4484Const combinedClrConversions = ConversionKind.Reference Or ConversionKind.Array Or ConversionKind.TypeParameter
Semantics\Operators.vb (37)
1930) As KeyValuePair(Of ConversionKind, MethodSymbol) 1934Dim result As KeyValuePair(Of ConversionKind, MethodSymbol) = Nothing 1961Dim conversionKinds = ArrayBuilder(Of KeyValuePair(Of ConversionKind, ConversionKind)).GetInstance() 1969result = New KeyValuePair(Of ConversionKind, MethodSymbol)(ConversionKind.Widening Or ConversionKind.UserDefined, bestMatch) 1979result = New KeyValuePair(Of ConversionKind, MethodSymbol)(ConversionKind.Narrowing Or ConversionKind.UserDefined, bestMatch) 2004result = New KeyValuePair(Of ConversionKind, MethodSymbol)(ConversionKind.Widening Or 2005ConversionKind.UserDefined Or 2006ConversionKind.Nullable, bestMatch) 2012result = New KeyValuePair(Of ConversionKind, MethodSymbol)(ConversionKind.Narrowing Or 2013ConversionKind.UserDefined Or 2014ConversionKind.Nullable, bestMatch) 2035conversionKinds As ArrayBuilder(Of KeyValuePair(Of ConversionKind, ConversionKind)), 2115Dim conversionIn As ConversionKind 2116Dim conversionOut As ConversionKind 2119conversionKinds(currentIndex) = New KeyValuePair(Of ConversionKind, ConversionKind)(conversionIn, conversionOut) 2302<Out()> ByRef conversionIn As ConversionKind, 2303<Out()> ByRef conversionOut As ConversionKind, 2327conversionIn = ConversionKind.Identity 2372conversionKinds As ArrayBuilder(Of KeyValuePair(Of ConversionKind, ConversionKind)), 2459Dim conversionIn As ConversionKind 2460Dim conversionOut As ConversionKind 2466Dim conversion As KeyValuePair(Of ConversionKind, ConversionKind) = conversionKinds(currentIndex) 2475conversionKinds(currentIndex) = New KeyValuePair(Of ConversionKind, ConversionKind)(conversionIn, conversionOut) 2695Dim conv As ConversionKind = Conversions.ClassifyPredefinedConversion(type, typeSet(j), useSiteInfo) 2740Dim conv As ConversionKind = Conversions.ClassifyPredefinedConversion(typeSet(j), type, useSiteInfo)
Semantics\OverloadResolution.vb (45)
555Private Const s_delegateRelaxationLevelMask_AssertZero = SmallFieldMask.DelegateRelaxationLevelMask - ConversionKind.DelegateRelaxationLevelMask 566Public ReadOnly Conversion As KeyValuePair(Of ConversionKind, MethodSymbol) 569Public Sub New(value As BoundExpression, conversion As KeyValuePair(Of ConversionKind, MethodSymbol), dependencies As ImmutableArray(Of AssemblySymbol)) 647Public ReadOnly Property MaxDelegateRelaxationLevel As ConversionKind 649Return CType(_smallFields And SmallFieldMask.DelegateRelaxationLevelMask, ConversionKind) 653Public Sub RegisterDelegateRelaxationLevel(conversionKind As ConversionKind) 657Debug.Assert(relaxationLevel <= ConversionKind.DelegateRelaxationLevelNarrowing) 659If relaxationLevel = ConversionKind.DelegateRelaxationLevelNarrowing Then 746Public ConversionsOpt As ImmutableArray(Of KeyValuePair(Of ConversionKind, MethodSymbol)) 747Public ConversionsBackOpt As ImmutableArray(Of KeyValuePair(Of ConversionKind, MethodSymbol)) 1011candidate.MaxDelegateRelaxationLevel = ConversionKind.DelegateRelaxationLevelNarrowing)) 1334If candidate.RequiresNarrowingConversion OrElse candidate.MaxDelegateRelaxationLevel = ConversionKind.DelegateRelaxationLevelNarrowing Then 1986Dim minMaxRelaxation As ConversionKind = ConversionKind.DelegateRelaxationLevelInvalid 1993Dim relaxation As ConversionKind = current.MaxDelegateRelaxationLevel 2013Dim relaxation As ConversionKind = current.MaxDelegateRelaxationLevel 2758Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) = current.ConversionsOpt(j) 2764If (conv.Key And ConversionKind.UserDefined) = 0 Then 2770If (conv.Key And ConversionKind.Nullable) = 0 Then 2895conv As ConversionKind, 2899Debug.Assert((conv And ConversionKind.UserDefined) = 0) 2900Return (conv And ConversionKind.Nullable) <> 0 AndAlso 3231Dim conversionKinds As KeyValuePair(Of ConversionKind, MethodSymbol)() = Nothing 3232Dim conversionBackKinds As KeyValuePair(Of ConversionKind, MethodSymbol)() = Nothing 3313Dim arrayConversion As KeyValuePair(Of ConversionKind, MethodSymbol) = Nothing 3344conversionKinds = New KeyValuePair(Of ConversionKind, MethodSymbol)(arguments.Length - 1) {} 3391Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) = Nothing 3408conversionKinds = New KeyValuePair(Of ConversionKind, MethodSymbol)(arguments.Length - 1) {} 3471Dim conversion As KeyValuePair(Of ConversionKind, MethodSymbol) = Nothing 3472Dim conversionBack As KeyValuePair(Of ConversionKind, MethodSymbol) = Nothing 3492conversionKinds = New KeyValuePair(Of ConversionKind, MethodSymbol)(arguments.Length - 1) {} 3519conversionBackKinds = New KeyValuePair(Of ConversionKind, MethodSymbol)(arguments.Length - 1) {} 3565<Out()> ByRef outConversionKind As KeyValuePair(Of ConversionKind, MethodSymbol), 3566<Out()> ByRef outConversionBackKind As KeyValuePair(Of ConversionKind, MethodSymbol), 3584Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.ClassifyConversion(targetType, copyBackType, useSiteInfo) 3598Debug.Assert((conv.Key And ConversionKind.InvolvesNarrowingFromNumericConstant) = 0) 3644<Out()> ByRef outConversionKind As KeyValuePair(Of ConversionKind, MethodSymbol), 3660Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.ClassifyConversion(argument, targetType, binder, useSiteInfo) 3668If (conv.Key And (ConversionKind.DelegateRelaxationLevelMask Or ConversionKind.Lambda)) = (ConversionKind.DelegateRelaxationLevelInvalid Or ConversionKind.Lambda) Then 3715If (conv.Key And ConversionKind.InvolvesNarrowingFromNumericConstant) = 0 Then 3735ElseIf (conv.Key And ConversionKind.InvolvesNarrowingFromNumericConstant) <> 0 Then 3793<Out()> ByRef outConvKind As KeyValuePair(Of ConversionKind, MethodSymbol),
Semantics\TypeInference\TypeInferenceCollection.vb (14)
258Dim conversion As ConversionKind 270conversion = ConversionKind.Identity 429Dim conversion As ConversionKind 436conversion = ConversionKind.Identity 458conversion = ConversionKind.Identity 459ElseIf (conversion And ConversionKind.InvolvesNarrowingFromNumericConstant) <> 0 Then 468conversion = ConversionKind.Narrowing 479Dim inConversion As ConversionKind = Conversions.ClassifyConversion(hint, candidate, useSiteInfo).Key 482Dim outConversion As ConversionKind = Conversions.ClassifyConversion(candidate, hint, useSiteInfo).Key 488conversion = ConversionKind.Narrowing 490conversion = ConversionKind.Identity 494conversion = ConversionKind.Widening 514conversion = ConversionKind.Identity 530conversion = ConversionKind.Identity
Symbols\Metadata\PE\PEFieldSymbol.vb (1)
259ConversionKind.WideningNothingLiteral,
Symbols\Source\SynthesizedEventAccessorSymbol.vb (12)
325Dim conversionKind1 As ConversionKind 326Dim conversionKind2 As ConversionKind 333Debug.Assert(conversionKind1 = ConversionKind.WideningReference) 334Debug.Assert(conversionKind2 = ConversionKind.WideningReference) 344New BoundDirectCast(syntax, boundBackingField.MakeRValue(), ConversionKind.WideningReference, updateMethod.Parameters(0).Type), 345New BoundDirectCast(syntax, boundParameter, ConversionKind.WideningReference, updateMethod.Parameters(1).Type)), 348ConversionKind.NarrowingReference, 410Debug.Assert(conversionKind1 = ConversionKind.WideningReference) 411Debug.Assert(conversionKind2 = ConversionKind.WideningReference) 421New BoundDirectCast(syntax, boundTmps(1).MakeRValue(), ConversionKind.WideningReference, updateMethod.Parameters(0).Type), 422New BoundDirectCast(syntax, boundParameter, ConversionKind.WideningReference, updateMethod.Parameters(1).Type)), 425ConversionKind.NarrowingReference,
Symbols\Source\SynthesizedSubmissionConstructorSymbol.vb (3)
80New BoundDirectCast(syntax, meReference, ConversionKind.Reference, type:=objectType), 94ConversionKind.Reference, type:=hostObjectField.Type), 114ConversionKind.Reference,
Utilities\VarianceAmbiguity.vb (1)
126(Conversions.ClassifyDirectCastConversion(typeArgument1, typeArgument2, useSiteInfo) And ConversionKind.Reference) <> 0