402 references to Conversions
Microsoft.CodeAnalysis.VisualBasic (402)
Binding\Binder_Attributes.vb (3)
765
Not
Conversions
.IsWideningConversion(conv.ConversionKind) OrElse
779
Not
Conversions
.IsWideningConversion(conv.ConversionKind) OrElse
793
Not
Conversions
.IsWideningConversion(conv.ConversionKind) OrElse
Binding\Binder_Conversions.vb (61)
87
Dim conv As ConversionKind =
Conversions
.ClassifyDirectCastConversion(argument, targetType, Me, useSiteInfo)
120
If
Conversions
.NoConversion(conv) Then
130
If
Conversions
.NoConversion(conv) Then
135
If
Conversions
.IsIdentityConversion(conv) Then
146
Dim constantResult =
Conversions
.TryFoldConstantConversion(
152
Debug.Assert(
Conversions
.IsIdentityConversion(conv) OrElse
158
constantResult =
Conversions
.TryFoldNothingReferenceConversion(argument, conv, targetType)
161
If Not
Conversions
.IsIdentityConversion(conv) Then
201
conv =
Conversions
.ClassifyTryCastConversion(argument, targetType, Me, useSiteInfo)
237
If
Conversions
.NoConversion(conv) Then
257
If
Conversions
.NoConversion(conv) Then
262
Dim constantResult =
Conversions
.TryFoldNothingReferenceConversion(argument, conv, targetType)
264
If Not
Conversions
.IsIdentityConversion(conv) Then
367
conv =
Conversions
.ClassifyConversionOfOperandOfConditionalBranch(argument, targetType, Me,
403
conv =
Conversions
.ClassifyConversion(argument, targetType, Me, useSiteInfo)
441
If (Not isExplicit OrElse explicitSemanticForConcatArgument) AndAlso
Conversions
.IsIdentityConversion(convKind.Key) Then
486
Conversions
.IsNarrowingConversion(convKind.Key) AndAlso
487
Conversions
.IsNarrowingConversion(
Conversions
.ClassifyArrayLiteralConversion(DirectCast(argument, BoundArrayLiteral), sourceType, Me, useSiteInfo))
507
If
Conversions
.NoConversion(convKind.Key) Then
518
If Not isExplicit AndAlso
Conversions
.IsNarrowingConversion(convKind.Key) AndAlso
579
If
Conversions
.NoConversion(convKind.Key) Then
580
If
Conversions
.FailedDueToNumericOverflow(convKind.Key) Then
741
Conversions
.IsWideningConversion(
Conversions
.Classify_Reference_Array_TypeParameterConversion(sourceTypeArgument,
844
conv =
Conversions
.Classify_Reference_Array_TypeParameterConversion(sourceArg, destinationArg,
848
If Not
Conversions
.IsWideningConversion(conv) Then
849
If Not
Conversions
.IsNarrowingConversion(conv) OrElse (conv And ConversionKind.VarianceConversionAmbiguity) = 0 Then
858
conv =
Conversions
.Classify_Reference_Array_TypeParameterConversion(destinationArg, sourceArg,
862
If Not
Conversions
.IsWideningConversion(conv) Then
864
Not
Conversions
.IsNarrowingConversion(conv) OrElse
872
conv =
Conversions
.ClassifyDirectCastConversion(sourceArg, destinationArg, useSiteInfo)
874
If
Conversions
.IsWideningConversion(conv) Then
877
conv =
Conversions
.ClassifyDirectCastConversion(destinationArg, sourceArg, useSiteInfo)
879
If
Conversions
.IsWideningConversion(conv) Then
985
Debug.Assert(
Conversions
.ConversionExists(convKind) AndAlso (convKind And ConversionKind.UserDefined) = 0)
993
If isExplicit OrElse OptionStrict <> VisualBasic.OptionStrict.On OrElse
Conversions
.IsWideningConversion(convKind) Then
994
Debug.Assert(Not
Conversions
.IsIdentityConversion(convKind))
1038
Dim constantResult =
Conversions
.TryFoldConstantConversion(
1048
constantResult =
Conversions
.TryFoldNothingReferenceConversion(argument, convKind, targetType)
1117
intermediateConv =
Conversions
.ClassifyArrayLiteralConversion(arrayLiteral, inType, arrayLiteralBinder, useSiteInfo)
1126
intermediateConv =
Conversions
.ClassifyPredefinedConversion(argument, inType, conversionBinder, useSiteInfo)
1128
If Not
Conversions
.IsIdentityConversion(intermediateConv) Then
1159
intermediateConv =
Conversions
.ClassifyPredefinedConversion(argument, targetType, conversionBinder, useSiteInfo)
1161
If Not
Conversions
.IsIdentityConversion(intermediateConv) Then
1247
If
Conversions
.ConversionExists(delegateResolutionResult.DelegateConversions) Then
1325
Debug.Assert(
Conversions
.NoConversion(convKind) AndAlso (convKind And ConversionKind.DelegateRelaxationLevelMask) = 0)
1327
Debug.Assert(
Conversions
.NoConversion(convKind) OrElse
1390
Debug.Assert(
Conversions
.NoConversion(convKind))
1408
Debug.Assert(
Conversions
.ClassifyMethodConversionForLambdaOrAnonymousDelegate(delegateInvoke, boundLambda.LambdaSymbol, CompoundUseSiteInfo(Of AssemblySymbol).Discarded) = MethodConversionKind.Identity OrElse
1439
ElseIf
Conversions
.IsStubRequiredForMethodConversion(boundLambda.MethodConversionKind) Then
1440
Debug.Assert(
Conversions
.IsDelegateRelaxationSupportedFor(boundLambda.MethodConversionKind))
1517
If
Conversions
.NoConversion(convKind) Then
1536
Conversions
.FailedDueToQueryLambdaBodyMismatch(convKind) Then
1708
If
Conversions
.IsNarrowingConversion(convKind) Then
1728
Not
Conversions
.IsWideningConversion(
Conversions
.ClassifyDirectCastConversion(classType, interfaceType, useSiteInfo)) Then
1772
Dim elemConv =
Conversions
.ClassifyDirectCastConversion(sourceElement, targetElement, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)
1774
If Not
Conversions
.IsIdentityConversion(elemConv) AndAlso
1780
ElseIf Not
Conversions
.IsIdentityConversion(elemConv) AndAlso
1781
Not (
Conversions
.IsWideningConversion(elemConv) AndAlso
Binding\Binder_Delegates.vb (15)
324
Dim delegateConversions As ConversionKind =
Conversions
.DetermineDelegateRelaxationLevel(methodConversions)
327
If
Conversions
.IsNarrowingMethodConversion(methodConversions, isForAddressOf:=Not isForHandles) Then
640
Conversions
.ClassifyMethodConversionBasedOnReturn(targetMethodSymbol.ReturnType, targetMethodSymbol.ReturnsByRef,
683
Conversions
.IsDelegateRelaxationSupportedFor(methodConversions) AndAlso
684
Conversions
.IsStubRequiredForMethodConversion(methodConversions) Then
688
If
Conversions
.IsDelegateRelaxationSupportedFor(methodConversions) Then
818
Not
Conversions
.IsIdentityConversion(bestResult.ConversionsOpt(lastCommonIndex).Key) Then
834
Debug.Assert(
Conversions
.IsWideningConversion(bestResult.ConversionsOpt(lastCommonIndex).Key))
836
Dim conv =
Conversions
.ClassifyConversion(bestCandidate.Parameters(lastCommonIndex).Type,
841
Conversions
.ClassifyMethodConversionBasedOnArgumentConversion(conv.Key,
876
Conversions
.ClassifyMethodConversionBasedOnArgumentConversion(conversion.Key,
885
If Not
Conversions
.IsIdentityConversion(conversion.Key) Then
888
Conversions
.ClassifyMethodConversionBasedOnArgumentConversion(conversion.Key,
993
If Me.OptionStrict = OptionStrict.On AndAlso
Conversions
.IsNarrowingConversion(delegateResolutionResult.DelegateConversions) Then
1008
If
Conversions
.IsStubRequiredForMethodConversion(delegateResolutionResult.MethodConversions) OrElse
Binding\Binder_Expressions.vb (8)
792
Dim convKind As ConversionKind =
Conversions
.ClassifyTryCastConversion(operandType, targetType, useSiteInfo)
797
ElseIf Not
Conversions
.ConversionExists(convKind) Then
1499
If
Conversions
.NoConversion(conv) AndAlso (conv And ConversionKind.FailedDueToArrayLiteralElementConversion) = 0 Then
1571
Debug.Assert(Not
Conversions
.IsIdentityConversion(conv))
1580
conv =
Conversions
.ClassifyStringConversion(sourceType, destination)
1582
If
Conversions
.IsWideningConversion(conv) Then
4885
Not
Conversions
.IsWideningConversion(
Conversions
.ClassifyDirectCastConversion(getAwaiter.Type, notifyCompletion, useSiteInfo)) Then
Binding\Binder_Invocation.vb (16)
1040
Conversions
.ClassifyConversion(receiver, targetType, Me, useSiteInfo),
1042
Conversions
.ClassifyConversion(targetType, receiver.Type, useSiteInfo),
2496
Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) =
Conversions
.ClassifyConversion(boundTemp, copyBackType, Me, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)
2498
If
Conversions
.NoConversion(conv.Key) Then
2501
ElseIf
Conversions
.IsNarrowingConversion(conv.Key) Then
2554
Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) =
Conversions
.ClassifyConversion(argument, targetType, Me, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)
2556
If
Conversions
.NoConversion(conv.Key) Then
2569
If
Conversions
.IsNarrowingConversion(conv.Key) Then
2699
Dim conversion As KeyValuePair(Of ConversionKind, MethodSymbol) =
Conversions
.Identity
2700
Dim conversionBack As KeyValuePair(Of ConversionKind, MethodSymbol) =
Conversions
.Identity
2710
Conversions
.Identity,
2826
Dim checkAgainst As KeyValuePair(Of ConversionKind, MethodSymbol) =
Conversions
.ClassifyConversion(argument, targetType, Me, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)
2839
If isLValue AndAlso
Conversions
.IsIdentityConversion(conversionTo.Key) Then
2841
Debug.Assert(
Conversions
.IsIdentityConversion(conversionFrom.Key))
2860
checkAgainst =
Conversions
.ClassifyConversion(outPlaceholder, copyBackType, Me, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)
2961
Dim checkAgainst As KeyValuePair(Of ConversionKind, MethodSymbol) =
Conversions
.ClassifyConversion(argument, targetType, Me, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)
Binding\Binder_Lambda.vb (6)
254
methodConversions =
Conversions
.ClassifyMethodConversionForLambdaOrAnonymousDelegate(target, lambdaSymbol, useSiteInfo)
261
If
Conversions
.IsDelegateRelaxationSupportedFor(methodConversions) Then
262
If
Conversions
.IsStubRequiredForMethodConversion(methodConversions) Then
297
delegateRelaxation = CType(Math.Max(delegateRelaxation,
Conversions
.DetermineDelegateRelaxationLevel(methodConversions)), ConversionKind)
384
Dim returnRelaxation As ConversionKind =
Conversions
.DetermineDelegateRelaxationLevelForLambdaReturn(node.ExpressionOpt, _useSiteDiagnostics)
395
Dim returnRelaxation As ConversionKind =
Conversions
.DetermineDelegateRelaxationLevelForLambdaReturn(node.Expression, _useSiteDiagnostics)
Binding\Binder_Statements.vb (11)
3456
If
Conversions
.IsIdentityConversion(
Conversions
.ClassifyConversion(elementType, currentType, useSiteInfo:=CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key) Then
3470
Not
Conversions
.IsIdentityConversion(
Conversions
.ClassifyConversion(controlVariableType, elementType, useSiteInfo:=CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key) Then
3511
Dim conversionKind As ConversionKind =
Conversions
.ClassifyTryCastConversion(enumeratorType, idisposableType, useSiteInfo)
3996
Dim conversionKind =
Conversions
.ClassifyDirectCastConversion(getEnumeratorReturnType, idisposable, useSiteInfo)
4000
isOrInheritsFromOrImplementsIDisposable =
Conversions
.IsWideningConversion(conversionKind)
4602
Dim conversionKind =
Conversions
.ClassifyDirectCastConversion(resourceType, iDisposable, useSiteInfo)
4609
Dim isValidDispose =
Conversions
.IsWideningConversion(conversionKind)
5061
Not
Conversions
.ConversionExists(
Conversions
.ClassifyConversion(arg, retType, Me, useSiteInfo).Key) Then
Binding\MemberSemanticModel.vb (3)
150
Return New Conversion(
Conversions
.ClassifyConversion(boundExpression, vbDestination, GetEnclosingBinder(boundExpression.Syntax), CompoundUseSiteInfo(Of AssemblySymbol).Discarded))
781
currentConversion = New Conversion(
Conversions
.ClassifyConversion(current.Type, elementType, useSiteInfo:=CompoundUseSiteInfo(Of AssemblySymbol).Discarded))
789
elementConversion = New Conversion(
Conversions
.ClassifyConversion(elementType, boundCurrentConversion.Type, useSiteInfo:=CompoundUseSiteInfo(Of AssemblySymbol).Discarded))
BoundTree\BoundBinaryConditionalExpression.vb (3)
41
Dim conversion As ConversionKind =
Conversions
.ClassifyDirectCastConversion(TestExpression.Type, Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)
42
Debug.Assert(
Conversions
.IsWideningConversion(conversion) AndAlso
Conversions
.IsCLRPredefinedConversion(conversion))
BoundTree\BoundConversion.vb (2)
43
If
Conversions
.NoConversion(ConversionKind) Then
48
If
Conversions
.IsIdentityConversion(ConversionKind) Then
BoundTree\BoundUserDefinedConversion.vb (2)
58
Debug.Assert(
Conversions
.ConversionExists(outConversion.ConversionKind) AndAlso (outConversion.ConversionKind And ConversionKind.UserDefined) = 0)
68
Debug.Assert(
Conversions
.ConversionExists(inConversion.ConversionKind) AndAlso (inConversion.ConversionKind And ConversionKind.UserDefined) = 0)
CodeGen\EmitConversion.vb (5)
198
If Not
Conversions
.IsIdentityConversion(conversion.ConversionKind) Then
288
Not
Conversions
.IsIdentityConversion(conversion.ConversionKind) AndAlso
324
If Not
Conversions
.IsIdentityConversion(conversion.ConversionKind) Then
389
If
Conversions
.IsWideningConversion(conversion.ConversionKind) Then
483
If Not
Conversions
.IsIdentityConversion(conversion.ConversionKind) Then
CodeGen\EmitExpression.vb (2)
1516
If (
Conversions
.IsWideningConversion(conversionKind)) Then
1523
If (
Conversions
.IsWideningConversion(conversionKind)) Then
Compilation\SemanticModel.vb (4)
920
conversion = New Conversion(
Conversions
.Identity)
982
conversion = New Conversion(
Conversions
.ClassifyConversion(type, convertedType, CompoundUseSiteInfo(Of AssemblySymbol).Discarded))
1558
Return New VisualBasicTypeInfo(type, type, New Conversion(
Conversions
.Identity))
2367
Return New Conversion(
Conversions
.ClassifyConversion(bnode, vbdestination, binder, CompoundUseSiteInfo(Of AssemblySymbol).Discarded))
Compilation\TypeInfo.vb (1)
18
Friend Shared None As New VisualBasicTypeInfo(Nothing, Nothing, New Conversion(
Conversions
.Identity))
Compilation\VisualBasicCompilation.vb (1)
1891
Return New Conversion(
Conversions
.ClassifyConversion(vbsource, vbdest, CompoundUseSiteInfo(Of AssemblySymbol).Discarded))
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Await.vb (2)
219
Conversions
.IsWideningConversion(
220
Conversions
.ClassifyDirectCastConversion(
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_ConditionalExpresion.vb (3)
110
Dim convKind As ConversionKind =
Conversions
.ClassifyPredefinedConversion(parameterType, conversion.Operand.Type, useSiteInfo)
203
Dim innerConversion As ConversionKind =
Conversions
.ClassifyConversion(realParameterType, expectedParameterType, useSiteInfo).Key
206
Dim innerConversionApplied As Boolean = Not
Conversions
.IsIdentityConversion(innerConversion)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_Conversion.vb (4)
21
If
Conversions
.IsIdentityConversion(node.ConversionKind) AndAlso Not node.Type.IsFloatingType() Then
30
If
Conversions
.IsIdentityConversion(node.ConversionKind) Then
39
If
Conversions
.IsIdentityConversion(node.ConversionKind) Then
67
(
Conversions
.IsIdentityConversion(conversion) AndAlso
Lowering\LambdaRewriter\LambdaRewriter.vb (1)
1469
Conversions
.ClassifyMethodConversionForLambdaOrAnonymousDelegate(
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.vb (1)
432
If Not
Conversions
.IsIdentityConversion(conversionKind) Then
Lowering\LocalRewriter\LocalRewriter_ConditionalExpressions.vb (2)
32
If
Conversions
.IsWideningConversion(conversion) AndAlso
Conversions
.IsCLRPredefinedConversion(conversion) AndAlso ((conversion And ConversionKind.TypeParameter) = 0) Then
Lowering\LocalRewriter\LocalRewriter_Conversion.vb (26)
13
If Not _inExpressionLambda AndAlso
Conversions
.IsIdentityConversion(node.ConversionKind) Then
314
Debug.Assert(Not
Conversions
.IsIdentityConversion(node.ConversionKind))
387
If
Conversions
.IsIdentityConversion(node.ConversionKind) Then
425
Dim convKind =
Conversions
.ClassifyConversion(rewrittenOperand.Type, innerTargetType, useSiteInfo).Key
426
Debug.Assert(
Conversions
.ConversionExists(convKind))
452
Dim convKind =
Conversions
.ClassifyDirectCastConversion(unwrappedOperand.Type, resultType, useSiteInfo)
453
Debug.Assert(
Conversions
.ConversionExists(convKind))
535
Dim convKind =
Conversions
.ClassifyConversion(operand.Type, unwrappedResultType, useSiteInfo).Key
536
Debug.Assert(
Conversions
.ConversionExists(convKind))
541
Dim constantResult =
Conversions
.TryFoldConstantConversion(operand, unwrappedResultType, integerOverflow)
721
(
Conversions
.IsIdentityConversion(rewrittenConversion.ConversionKind) AndAlso
806
Conversions
.ClassifyDirectCastConversion(operand.Type, objectType, useSiteInfo),
823
Conversions
.ClassifyDirectCastConversion(node.Operand.Type, node.Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded))
881
Conversions
.ClassifyDirectCastConversion(operand.Type, typeFrom, useSiteInfo),
899
Debug.Assert(conv =
Conversions
.ClassifyConversion(memberSymbol.ReturnType, targetResultType, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
972
Debug.Assert(conv =
Conversions
.ClassifyConversion(operandType, memberSymbol.Parameters(0).Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
1044
Debug.Assert(conv =
Conversions
.ClassifyConversion(memberSymbol.ReturnType, targetResultType, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
1111
Debug.Assert(conv =
Conversions
.ClassifyConversion(operandType, memberSymbol.Parameters(0).Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
1181
Debug.Assert(conv =
Conversions
.ClassifyConversion(memberSymbol.ReturnType, targetResultType, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
1218
Debug.Assert(ConversionKind.WideningNumeric =
Conversions
.ClassifyConversion(typeFrom, mathRound.Parameters(0).Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
1227
Debug.Assert(node.ConversionKind =
Conversions
.ClassifyConversion(mathRound.ReturnType, node.Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
1287
If Not _inExpressionLambda AndAlso
Conversions
.IsIdentityConversion(node.ConversionKind) Then
1313
If Not _inExpressionLambda AndAlso
Conversions
.IsIdentityConversion(node.ConversionKind) Then
1327
If
Conversions
.IsWideningConversion(node.ConversionKind) AndAlso
1328
Not
Conversions
.IsIdentityConversion(node.ConversionKind) Then
1338
Debug.Assert(node.ConversionKind =
Conversions
.ClassifyDirectCastConversion(operand.Type, node.Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded))
Lowering\LocalRewriter\LocalRewriter_LateBindingHelpers.vb (7)
24
Dim convKind =
Conversions
.ClassifyDirectCastConversion(rewrittenReceiver.Type, objectType, useSiteInfo)
129
Dim convKind =
Conversions
.ClassifyDirectCastConversion(argument.Type, objectType, useSiteInfo)
170
Dim convKind =
Conversions
.ClassifyDirectCastConversion(rewrittenValue.Type, objectType, useSiteInfo)
217
Dim convKind =
Conversions
.ClassifyDirectCastConversion(argument.Type, objectType, useSiteInfo)
233
Dim convKind =
Conversions
.ClassifyDirectCastConversion(rewrittenValue.Type, objectType, useSiteInfo)
283
Dim convKind =
Conversions
.ClassifyDirectCastConversion(argument.Type, objectType, useSiteInfo)
386
Dim conversionKind =
Conversions
.ClassifyDirectCastConversion(objectType, targetType, useSiteInfo)
Lowering\LocalRewriter\LocalRewriter_LocalDeclaration.vb (1)
202
Conversions
.ClassifyDirectCastConversion(flag.Type, objectType, useSiteInfo),
Lowering\LocalRewriter\LocalRewriter_ObjectCreation.vb (3)
43
Dim conv As ConversionKind =
Conversions
.ClassifyDirectCastConversion(result.Type, node.Type, useSiteInfo)
44
Debug.Assert(
Conversions
.ConversionExists(conv))
90
Dim conversion =
Conversions
.ClassifyDirectCastConversion(createInstance.ReturnType, node.Type, useSiteInfo)
Lowering\LocalRewriter\LocalRewriter_OmittedArgument.vb (1)
24
Dim conversion =
Conversions
.ClassifyDirectCastConversion(fieldAccess.Type, node.Type, useSiteInfo)
Lowering\LocalRewriter\LocalRewriter_RedimClause.vb (3)
55
Conversions
.ClassifyDirectCastConversion(arrayValueAccess.Type, systemArray, useSiteInfo),
59
Conversions
.ClassifyDirectCastConversion(valueBeingAssigned.Type, systemArray, useSiteInfo),
71
Conversions
.ClassifyDirectCastConversion(valueBeingAssigned.Type, assignmentTarget.Type, useSiteInfo),
Lowering\LocalRewriter\LocalRewriter_SyncLock.vb (3)
26
Dim conversionKind =
Conversions
.ClassifyConversion(visitedLockExpression.Type, objectType, useSiteInfo).Key
33
If Not
Conversions
.IsIdentityConversion(conversionKind) Then
35
Dim constantResult =
Conversions
.TryFoldConstantConversion(
Lowering\SyntheticBoundNodeFactory.vb (7)
357
Dim conversion =
Conversions
.ClassifyDirectCastConversion(expression.Type, Me.CurrentMethod.ReturnType, useSiteInfo)
358
Debug.Assert(
Conversions
.IsWideningConversion(conversion))
361
If Not
Conversions
.IsIdentityConversion(conversion) Then
631
Return New BoundTryCast(Me.Syntax, expression,
Conversions
.ClassifyTryCastConversion(expression.Type, type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded), type)
645
Conversions
.ClassifyDirectCastConversion(expression.Type, type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)),
920
Debug.Assert(systemReflectionMethodInfo.IsErrorType() OrElse
Conversions
.IsDerivedFrom(systemReflectionMethodInfo, getMethodFromHandle.ReturnType, discardedUseSiteInfo))
1020
Return Convert(type, arg,
Conversions
.ClassifyConversion(arg.Type, type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key, isChecked)
Semantics\Conversions.vb (63)
44
Return Not
Conversions
.NoConversion(_convKind)
53
Return
Conversions
.IsNarrowingConversion(_convKind)
62
Return
Conversions
.IsWideningConversion(_convKind)
74
Return
Conversions
.IsIdentityConversion(_convKind)
573
If
Conversions
.NoConversion(conv) Then
596
If Not (
Conversions
.IsIdentityConversion(conv) AndAlso sourceEnum.IsSameTypeIgnoringAll(targetEnum)) Then
601
ElseIf
Conversions
.IsWideningConversion(conv) Then
609
Debug.Assert(
Conversions
.IsNarrowingConversion(conv))
625
Debug.Assert(
Conversions
.IsIdentityConversion(conv) OrElse (conv And ConversionKind.InvolvesEnumTypeConversions) <> 0)
649
If
Conversions
.IsNarrowingConversion(conv) Then
652
ElseIf Not
Conversions
.IsIdentityConversion(conv) Then
653
Debug.Assert(
Conversions
.IsWideningConversion(conv))
657
Debug.Assert(
Conversions
.IsIdentityConversion(conv) AndAlso sourceNullable.IsSameTypeIgnoringAll(targetNullable))
669
If
Conversions
.IsWideningConversion(conv) Then
674
Debug.Assert(
Conversions
.IsNarrowingConversion(conv))
1196
If
Conversions
.NoConversion(conv) Then
1201
If
Conversions
.NoConversion(conv) Then
1208
If
Conversions
.NoConversion(arrayLiteralElementConv) Then
1213
If
Conversions
.IsWideningConversion(conv) Then
1460
Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) =
Conversions
.ClassifyConversion(operand, booleanType, binder, useSiteInfo)
1463
If
Conversions
.IsWideningConversion(conv.Key) Then
1478
convToNullableOfBoolean =
Conversions
.Identity
1487
convToNullableOfBoolean =
Conversions
.ClassifyConversion(operand, nullableOfBoolean, binder, useSiteInfo)
1491
If
Conversions
.IsWideningConversion(convToNullableOfBoolean.Key) Then
1514
ElseIf
Conversions
.IsNarrowingConversion(convToNullableOfBoolean.Key) AndAlso
2344
If Not
Conversions
.ClassifyAsReferenceType(source, srcIsClassType, srcIsDelegateType, srcIsInterfaceType, srcIsArrayType) OrElse
2345
Not
Conversions
.ClassifyAsReferenceType(destination, dstIsClassType, dstIsDelegateType, dstIsInterfaceType, dstIsArrayType) Then
2445
Debug.Assert(source IsNot Nothing AndAlso
Conversions
.IsArrayType(source))
2446
Debug.Assert(destination IsNot Nothing AndAlso
Conversions
.IsInterfaceType(destination))
2522
If
Conversions
.IsWideningConversion(conv) AndAlso
2536
Debug.Assert(source IsNot Nothing AndAlso
Conversions
.IsDelegateType(source))
2537
Debug.Assert(destination IsNot Nothing AndAlso
Conversions
.IsDelegateType(destination))
2616
(
Conversions
.IsInterfaceType(source) OrElse
Conversions
.IsClassType(source) OrElse
Conversions
.IsValueType(source)))
2617
Debug.Assert(destination IsNot Nothing AndAlso
Conversions
.IsInterfaceType(destination))
2624
If
Conversions
.IsInterfaceType(source) Then
2651
Debug.Assert(
Conversions
.IsInterfaceType(source) AndAlso
Conversions
.IsInterfaceType(destination))
2704
Debug.Assert(
Conversions
.IsInterfaceType(source) OrElse
Conversions
.IsDelegateType(source))
2705
Debug.Assert(
Conversions
.IsInterfaceType(destination) OrElse
Conversions
.IsDelegateType(destination))
2706
Debug.Assert(
Conversions
.IsInterfaceType(source) =
Conversions
.IsInterfaceType(destination))
2761
Dim classifyingInterfaceConversions As Boolean =
Conversions
.IsInterfaceType(source)
2937
(
Conversions
.IsClassType(derivedType) OrElse
Conversions
.IsArrayType(derivedType) OrElse
Conversions
.IsValueType(derivedType)))
2938
Debug.Assert(baseType IsNot Nothing AndAlso
Conversions
.IsClassType(baseType))
2979
If
Conversions
.IsNarrowingMethodConversion(methodConversion, isForAddressOf:=True) Then
3016
If Not
Conversions
.IsArrayType(source) OrElse Not
Conversions
.IsArrayType(destination) Then
4128
If
Conversions
.NoConversion(conversion) Then
4130
ElseIf
Conversions
.IsNarrowingConversion(conversion) Then
4132
ElseIf Not
Conversions
.IsIdentityConversion(conversion) Then
4133
Debug.Assert(
Conversions
.IsWideningConversion(conversion))
4135
If
Conversions
.IsCLRPredefinedConversion(conversion) AndAlso
4161
Dim methodConversions =
Conversions
.ClassifyMethodConversionBasedOnReturn(lambdaOrDelegateInvokeSymbol.ReturnType, lambdaOrDelegateInvokeSymbol.ReturnsByRef,
4210
Conversions
.ClassifyMethodConversionBasedOnArgumentConversion(
4211
Conversions
.ClassifyConversion(toParameterType, lambdaParameterType, useSiteInfo).Key,
4217
Conversions
.ClassifyMethodConversionBasedOnArgumentConversion(
4218
Conversions
.ClassifyConversion(lambdaParameterType, toParameterType, useSiteInfo).Key,
Semantics\Operators.vb (43)
440
If
Conversions
.HasWideningDirectCastConversionButNotEnumTypeConversion(targetType, sourceType, useSiteInfo) Then
449
ElseIf
Conversions
.HasWideningDirectCastConversionButNotEnumTypeConversion(sourceType, targetType, useSiteInfo) Then
2128
If Not (
Conversions
.IsWideningConversion(conversionIn) AndAlso
Conversions
.IsWideningConversion(conversionOut)) Then
2132
If Not (
Conversions
.IsIdentityConversion(conversionIn) AndAlso
Conversions
.IsIdentityConversion(conversionOut)) Then
2147
If
Conversions
.IsIdentityConversion(conversionIn) AndAlso
Conversions
.IsIdentityConversion(conversionOut) Then
2153
If
Conversions
.IsIdentityConversion(conversionIn) Then
2157
If
Conversions
.IsIdentityConversion(conversionOut) Then
2324
conversionIn =
Conversions
.ClassifyArrayLiteralConversion(arrayLiteral, inputType, arrayLiteral.Binder, useSiteInfo)
2325
If
Conversions
.IsWideningConversion(conversionIn) AndAlso
2330
conversionIn =
Conversions
.ClassifyPredefinedConversion(source, inputType, useSiteInfo)
2333
conversionOut =
Conversions
.ClassifyPredefinedConversion(outputType, destination, useSiteInfo)
2351
If
Conversions
.ConversionExists(
Conversions
.ClassifyPredefinedConversion(inputType, outputType, localUseSiteInfo)) OrElse
2472
Debug.Assert(Not (
Conversions
.IsWideningConversion(conversionIn) AndAlso
Conversions
.IsWideningConversion(conversionOut)))
2484
If Not (
Conversions
.ConversionExists(conversionIn) AndAlso
Conversions
.ConversionExists(conversionOut)) Then
2488
If Not (
Conversions
.IsIdentityConversion(conversionIn) AndAlso
Conversions
.IsIdentityConversion(conversionOut)) Then
2503
If
Conversions
.IsIdentityConversion(conversionIn) AndAlso
Conversions
.IsIdentityConversion(conversionOut) Then
2509
If
Conversions
.IsWideningConversion(conversionIn) Then
2510
If
Conversions
.IsIdentityConversion(conversionIn) Then
2516
If
Conversions
.IsWideningConversion(conversionOut) Then
2517
If
Conversions
.IsIdentityConversion(conversionOut) Then
2523
Debug.Assert(
Conversions
.IsNarrowingConversion(conversionOut))
2526
Debug.Assert(
Conversions
.IsNarrowingConversion(conversionIn))
2528
If
Conversions
.IsIdentityConversion(conversionOut) Then
2530
ElseIf Not
Conversions
.IsNarrowingConversion(conversionOut) Then
2531
Debug.Assert(
Conversions
.IsWideningConversion(conversionOut) AndAlso Not
Conversions
.IsIdentityConversion(conversionOut))
2544
Debug.Assert(
Conversions
.IsNarrowingConversion(conversionOut))
2593
If Not
Conversions
.IsWideningConversion(conversionKinds(i).Key) Then
2597
Debug.Assert(
Conversions
.IsNarrowingConversion(conversionKinds(i).Key))
2625
If Not
Conversions
.IsWideningConversion(conversionKinds(i).Value) Then
2629
Debug.Assert(
Conversions
.IsNarrowingConversion(conversionKinds(i).Value))
2695
Dim conv As ConversionKind =
Conversions
.ClassifyPredefinedConversion(type, typeSet(j), useSiteInfo)
2697
If Not
Conversions
.IsWideningConversion(conv) Then
2740
Dim conv As ConversionKind =
Conversions
.ClassifyPredefinedConversion(typeSet(j), type, useSiteInfo)
2742
If Not
Conversions
.IsWideningConversion(conv) Then
Semantics\OverloadResolution.vb (34)
2025
Dim leftToRightConversion =
Conversions
.ClassifyConversion(left, right, useSiteInfo)
2029
If
Conversions
.IsIdentityConversion(leftToRightConversion.Key) Then
2034
If
Conversions
.IsWideningConversion(leftToRightConversion.Key) Then
2039
If
Conversions
.IsWideningConversion(
Conversions
.ClassifyConversion(right, left, useSiteInfo).Key) Then
2057
If
Conversions
.IsWideningConversion(
Conversions
.ClassifyConversion(right, left, useSiteInfo).Key) Then
2400
If
Conversions
.IsNarrowingConversion(conv.Key) Then
2552
IsUnwrappingNullable(
Conversions
.ClassifyPredefinedConversion(sourceType, targetType, useSiteInfo), sourceType, targetType)
2965
ElseIf
Conversions
.IsNarrowingConversion(arrayConversion.Key) Then
2978
Debug.Assert(
Conversions
.IsWideningConversion(arrayConversion.Key))
2982
If Not
Conversions
.IsIdentityConversion(arrayConversion.Key) Then
2986
conversionKinds(i) =
Conversions
.Identity
3046
If Not
Conversions
.IsIdentityConversion(conv.Key) Then
3050
conversionKinds(i) =
Conversions
.Identity
3125
conversionBack =
Conversions
.Identity
3130
If Not
Conversions
.IsIdentityConversion(conversion.Key) Then
3134
conversionKinds(i) =
Conversions
.Identity
3155
If Not
Conversions
.IsIdentityConversion(conversionBack.Key) Then
3161
conversionBackKinds(i) =
Conversions
.Identity
3214
outConversionKind =
Conversions
.Identity
3215
outConversionBackKind =
Conversions
.Identity
3218
outConversionBackKind =
Conversions
.Identity
3224
Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) =
Conversions
.ClassifyConversion(targetType, copyBackType, useSiteInfo)
3227
If
Conversions
.NoConversion(conv.Key) Then
3231
If
Conversions
.IsNarrowingConversion(conv.Key) Then
3269
outConversionBackKind =
Conversions
.Identity
3300
Dim conv As KeyValuePair(Of ConversionKind, MethodSymbol) =
Conversions
.ClassifyConversion(argument, targetType, binder, useSiteInfo)
3304
If
Conversions
.NoConversion(conv.Key) Then
3346
If
Conversions
.IsNarrowingConversion(conv.Key) Then
3440
outConvKind =
Conversions
.ClassifyConversion(expression, targetType, binder, useSiteInfo)
3443
If
Conversions
.IsWideningConversion(outConvKind.Key) Then
3450
Debug.Assert(
Conversions
.IsNarrowingConversion(outConvKind.Key))
4764
Return
Conversions
.HasWideningDirectCastConversionButNotEnumTypeConversion(instanceType, receiverType, useSiteInfo)
Semantics\TypeInference\TypeArgumentInference.vb (9)
380
competitor.InferenceRestrictions =
Conversions
.CombineConversionRequirements(
552
inferenceRestrictions =
Conversions
.CombineConversionRequirements(
554
Conversions
.InvertConversionRequirement(inferenceRestrictions))
1489
paramInferenceRestrictions =
Conversions
.InvertConversionRequirement(
1490
Conversions
.StrengthenConversionRequirementToReference(inferenceRestrictions))
1494
paramInferenceRestrictions =
Conversions
.StrengthenConversionRequirementToReference(inferenceRestrictions)
1551
Conversions
.CombineConversionRequirements(inferenceRestrictions, RequiredConversion.ArrayElement))
1574
Conversions
.CombineConversionRequirements(inferenceRestrictions, If(argumentIsAarrayLiteral, RequiredConversion.Any, RequiredConversion.ArrayElement)))
1946
(addrOf.Binder.OptionStrict = OptionStrict.On AndAlso
Conversions
.IsNarrowingMethodConversion(methodConversions, isForAddressOf:=True)) Then
Semantics\TypeInference\TypeInferenceCollection.vb (32)
263
conversion =
Conversions
.ClassifyConversion(inner.ResultType, outer.ResultType, useSiteInfo).Key
267
conversion =
Conversions
.ClassifyConversion(arrayLiteral, outer.ResultType, arrayLiteral.Binder, useSiteInfo).Key
268
If
Conversions
.IsWideningConversion(conversion) AndAlso
274
If Not
Conversions
.IsWideningConversion(conversion) Then
438
conversion =
Conversions
.ClassifyDirectCastConversion(hint, candidate, useSiteInfo)
440
If Not
Conversions
.IsIdentityConversion(conversion) Then
450
conversion =
Conversions
.ClassifyConversion(hint, candidate, useSiteInfo).Key
454
conversion =
Conversions
.ClassifyConversion(arrayLiteral, candidate, arrayLiteral.Binder, useSiteInfo).Key
455
If
Conversions
.IsWideningConversion(conversion) Then
475
conversion =
Conversions
.ClassifyConversion(candidate, hint, useSiteInfo).Key
479
Dim inConversion As ConversionKind =
Conversions
.ClassifyConversion(hint, candidate, useSiteInfo).Key
482
Dim outConversion As ConversionKind =
Conversions
.ClassifyConversion(candidate, hint, useSiteInfo).Key
485
If
Conversions
.NoConversion(inConversion) OrElse
Conversions
.NoConversion(outConversion) Then
487
ElseIf
Conversions
.IsNarrowingConversion(inConversion) OrElse
Conversions
.IsNarrowingConversion(outConversion) Then
489
ElseIf
Conversions
.IsIdentityConversion(inConversion) AndAlso
Conversions
.IsIdentityConversion(outConversion) Then
492
Debug.Assert(
Conversions
.IsWideningConversion(inConversion) AndAlso
Conversions
.IsWideningConversion(outConversion) AndAlso
493
Not (
Conversions
.IsIdentityConversion(inConversion) AndAlso
Conversions
.IsIdentityConversion(outConversion)))
498
conversion =
Conversions
.ClassifyArrayElementConversion(hint, candidate, useSiteInfo)
503
conversion =
Conversions
.ClassifyDirectCastConversion(hint, candidate, useSiteInfo)
510
If
Conversions
.IsNarrowingConversion(conversion) Then
523
conversion =
Conversions
.ClassifyDirectCastConversion(candidate, hint, useSiteInfo)
526
If
Conversions
.IsNarrowingConversion(conversion) Then
539
If
Conversions
.NoConversion(conversion) Then
541
ElseIf
Conversions
.IsNarrowingConversion(conversion) Then
543
ElseIf
Conversions
.IsIdentityConversion(conversion) Then
545
ElseIf
Conversions
.IsWideningConversion(conversion) Then
588
competitor.InferenceRestrictions =
Conversions
.CombineConversionRequirements(
Symbols\ConstraintsHelper.vb (2)
786
If result.IsClassType AndAlso
Conversions
.IsDerivedFrom(candidate, result, useSiteInfo) Then
928
Return
Conversions
.HasWideningDirectCastConversionButNotEnumTypeConversion(typeArgument, constraintType, useSiteInfo)
Symbols\Metadata\PE\PEFieldSymbol.vb (1)
258
Conversions
.TryFoldNothingReferenceConversion(value,
Symbols\Source\CustomEventAccessorSymbol.vb (3)
191
Dim conversion =
Conversions
.ClassifyMethodConversionForEventRaise(
197
(Not
Conversions
.IsDelegateRelaxationSupportedFor(conversion) OrElse
198
(binder.OptionStrict = OptionStrict.On AndAlso
Conversions
.IsNarrowingMethodConversion(conversion, False))) Then
Symbols\Source\SourceMemberMethodSymbol.vb (1)
830
If Not
Conversions
.ConversionExists(resolutionResult.DelegateConversions) Then
Symbols\Source\SynthesizedEventAccessorSymbol.vb (4)
331
conversionKind1 =
Conversions
.ClassifyDirectCastConversion(fieldSymbol.Type, updateMethod.Parameters(0).Type, conversionsUseSiteInfo)
332
conversionKind2 =
Conversions
.ClassifyDirectCastConversion(boundParameter.Type, updateMethod.Parameters(1).Type, conversionsUseSiteInfo)
408
conversionKind1 =
Conversions
.ClassifyDirectCastConversion(boundTmps(1).Type, updateMethod.Parameters(0).Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)
409
conversionKind2 =
Conversions
.ClassifyDirectCastConversion(boundParameter.Type, updateMethod.Parameters(1).Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)
Utilities\VarianceAmbiguity.vb (1)
126
(
Conversions
.ClassifyDirectCastConversion(typeArgument1, typeArgument2, useSiteInfo) And ConversionKind.Reference) <> 0
VisualBasicExtensions.vb (2)
1407
Return If(inConversionConvertible IsNot Nothing, DirectCast(inConversionConvertible, Conversion), New Conversion(
Conversions
.Identity))
1425
Return If(outConversionConvertible IsNot Nothing, DirectCast(outConversionConvertible, Conversion), New Conversion(
Conversions
.Identity))