115 references to MethodConversionKind
Microsoft.CodeAnalysis.VisualBasic (115)
Binding\Binder_Conversions.vb (2)
1408
Debug.Assert(Conversions.ClassifyMethodConversionForLambdaOrAnonymousDelegate(delegateInvoke, boundLambda.LambdaSymbol, CompoundUseSiteInfo(Of AssemblySymbol).Discarded) =
MethodConversionKind
.Identity OrElse
1410
boundLambda.MethodConversionKind <>
MethodConversionKind
.Identity))
Binding\Binder_Delegates.vb (39)
24
Public ReadOnly MethodConversions As
MethodConversionKind
30
MethodConversions As
MethodConversionKind
,
226
Dim methodConversions As
MethodConversionKind
=
MethodConversionKind
.Identity
233
methodConversions = methodConversions Or
MethodConversionKind
.Error_Unspecified
239
methodConversions = methodConversions Or
MethodConversionKind
.Error_Unspecified
247
methodConversions = methodConversions Or
MethodConversionKind
.Error_Unspecified
252
Dim matchingMethod As KeyValuePair(Of MethodSymbol,
MethodConversionKind
) = ResolveMethodForDelegateInvokeFullAndRelaxed(
264
methodConversions = methodConversions Or
MethodConversionKind
.Error_Unspecified
277
methodConversions = methodConversions Or
MethodConversionKind
.Error_Unspecified
295
methodConversions = methodConversions Or
MethodConversionKind
.Error_Unspecified
318
methodConversions = methodConversions Or
MethodConversionKind
.Error_Unspecified
369
) As KeyValuePair(Of MethodSymbol,
MethodConversionKind
)
374
Dim matchingMethod As KeyValuePair(Of MethodSymbol,
MethodConversionKind
) = ResolveMethodForDelegateInvokeFullOrRelaxed(
413
Debug.Assert(matchingMethod.Key Is Nothing OrElse (matchingMethod.Value And
MethodConversionKind
.AllErrorReasons) = 0)
435
) As KeyValuePair(Of MethodSymbol,
MethodConversionKind
)
613
Return New KeyValuePair(Of MethodSymbol,
MethodConversionKind
)(Nothing,
MethodConversionKind
.Error_OverloadResolution)
623
) As KeyValuePair(Of MethodSymbol,
MethodConversionKind
)
625
Dim methodConversions As
MethodConversionKind
=
MethodConversionKind
.Identity
654
methodConversions = methodConversions Or
MethodConversionKind
.AllArgumentsIgnored
666
methodConversions = methodConversions Or
MethodConversionKind
.Error_IllegalToIgnoreAllArguments
685
methodConversions = methodConversions Or
MethodConversionKind
.Error_StubNotSupported
693
Return New KeyValuePair(Of MethodSymbol,
MethodConversionKind
)(targetMethodSymbol, methodConversions)
696
methodConversions = methodConversions Or
MethodConversionKind
.Error_Unspecified
705
Debug.Assert((methodConversions And
MethodConversionKind
.AllErrorReasons) <> 0)
715
Return New KeyValuePair(Of MethodSymbol,
MethodConversionKind
)(Nothing, methodConversions)
775
) As
MethodConversionKind
776
Dim methodConversions As
MethodConversionKind
=
MethodConversionKind
.Identity
796
methodConversions = methodConversions Or
MethodConversionKind
.ExcessOptionalArgumentsOnTarget
806
methodConversions = methodConversions Or
MethodConversionKind
.ExcessOptionalArgumentsOnTarget
850
methodConversions = methodConversions Or
MethodConversionKind
.Error_ByRefByValMismatch
856
(methodConversions And
MethodConversionKind
.Error_ByRefByValMismatch) <>
MethodConversionKind
.Error_ByRefByValMismatch Then
864
methodConversions = methodConversions Or
MethodConversionKind
.Error_ByRefByValMismatch
1022
isZeroArgumentKnownToBeUsed:=(delegateResolutionResult.MethodConversions And
MethodConversionKind
.AllArgumentsIgnored) <> 0,
1286
MethodConversionKind
.Identity)
Binding\Binder_Lambda.vb (4)
249
Dim methodConversions As
MethodConversionKind
=
MethodConversionKind
.Error_Unspecified
274
methodConversions = methodConversions Or
MethodConversionKind
.Error_RestrictedType
287
methodConversions = methodConversions Or
MethodConversionKind
.Error_RestrictedType
Generated\BoundNodes.xml.Generated.vb (4)
6875
Public 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)
6930
Private ReadOnly _MethodConversionKind As
MethodConversionKind
6931
Public ReadOnly Property MethodConversionKind As
MethodConversionKind
6942
Public 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\LambdaRewriter\LambdaRewriter.vb (1)
1470
method, DirectCast(receiver, BoundDelegateCreationExpression).Method, useSiteInfo) =
MethodConversionKind
.Identity Then
Lowering\LocalRewriter\LocalRewriter_LateAddressOf.vb (1)
143
MethodConversionKind
.Identity)
Lowering\LocalRewriter\LocalRewriter_Query.vb (1)
210
MethodConversionKind
.Identity)
Semantics\Conversions.vb (57)
2958
Dim methodConversion As
MethodConversionKind
= ClassifyMethodConversionForLambdaOrAnonymousDelegate(delegateInvoke,
4034
) As
MethodConversionKind
4036
Return
MethodConversionKind
.Error_ByRefByValMismatch
4047
) As
MethodConversionKind
4053
Return
MethodConversionKind
.Identity
4055
Return
MethodConversionKind
.ReturnValueIsDropped
4059
Return
MethodConversionKind
.Error_SubToFunction
4068
Return
MethodConversionKind
.Identity
4071
Return
MethodConversionKind
.Error_Unspecified
4077
Return
MethodConversionKind
.Error_ReturnTypeMismatch
4080
Dim result As
MethodConversionKind
4082
result =
MethodConversionKind
.ReturnIsWidening
4087
result =
MethodConversionKind
.Identity
4093
result =
MethodConversionKind
.ReturnIsIsVbOrBoxNarrowing
4098
result =
MethodConversionKind
.ReturnIsClrNarrowing
4100
result =
MethodConversionKind
.ReturnIsIsVbOrBoxNarrowing
4105
result =
MethodConversionKind
.Error_ReturnTypeMismatch
4127
) As
MethodConversionKind
4129
Return
MethodConversionKind
.Error_OverloadResolution
4131
Return
MethodConversionKind
.OneArgumentIsNarrowing
4137
Return
MethodConversionKind
.OneArgumentIsClrWidening
4139
Return
MethodConversionKind
.OneArgumentIsVbOrBoxWidening
4143
Return
MethodConversionKind
.Identity
4150
) As
MethodConversionKind
4158
) As
MethodConversionKind
4175
) As
MethodConversionKind
4186
) As
MethodConversionKind
4189
Dim methodConversions As
MethodConversionKind
4194
methodConversions = methodConversions Or
MethodConversionKind
.AllArgumentsIgnored
4196
methodConversions = methodConversions Or
MethodConversionKind
.Error_OverloadResolution
4201
methodConversions = methodConversions Or
MethodConversionKind
.Error_ByRefByValMismatch
4249
Dim methodConversion As
MethodConversionKind
4255
methodConversion =
MethodConversionKind
.Identity
4271
methodConversion As
MethodConversionKind
4275
If methodConversion =
MethodConversionKind
.Identity Then
4281
ElseIf (methodConversion And (
MethodConversionKind
.OneArgumentIsNarrowing Or
MethodConversionKind
.ReturnIsWidening)) <> 0 Then
4284
ElseIf (methodConversion And (
MethodConversionKind
.ReturnValueIsDropped Or
MethodConversionKind
.AllArgumentsIgnored)) = 0 Then
4294
Public Shared Function IsDelegateRelaxationSupportedFor(methodConversion As
MethodConversionKind
) As Boolean
4295
Return (methodConversion And
MethodConversionKind
.AllErrorReasons) = 0
4304
Public Shared Function IsStubRequiredForMethodConversion(methodConversions As
MethodConversionKind
) As Boolean
4305
Const methodConversionsRequiringStubs = (
MethodConversionKind
.OneArgumentIsNarrowing Or
4306
MethodConversionKind
.OneArgumentIsVbOrBoxWidening Or
4307
MethodConversionKind
.ReturnIsWidening Or
4308
MethodConversionKind
.ReturnIsIsVbOrBoxNarrowing Or
4309
MethodConversionKind
.ReturnValueIsDropped Or
4310
MethodConversionKind
.AllArgumentsIgnored Or
4311
MethodConversionKind
.ExcessOptionalArgumentsOnTarget)
4314
(methodConversions And
MethodConversionKind
.AllErrorReasons) = 0
4321
methodConversion As
MethodConversionKind
,
4324
Dim checkForBits As
MethodConversionKind
4327
checkForBits =
MethodConversionKind
.OneArgumentIsNarrowing Or
MethodConversionKind
.ReturnIsWidening Or
MethodConversionKind
.AllArgumentsIgnored
4329
checkForBits =
MethodConversionKind
.OneArgumentIsNarrowing Or
MethodConversionKind
.ReturnIsWidening
Semantics\OverloadResolution.vb (2)
3688
If bound IsNot Nothing AndAlso (bound.MethodConversionKind And
MethodConversionKind
.AllErrorReasons) =
MethodConversionKind
.Error_SubToFunction AndAlso
Semantics\TypeInference\TypeArgumentInference.vb (4)
1934
Dim methodConversions As
MethodConversionKind
=
MethodConversionKind
.Identity
1936
Dim matchingMethod As KeyValuePair(Of MethodSymbol,
MethodConversionKind
) = Binder.ResolveMethodForDelegateInvokeFullAndRelaxed(
1945
If fromMethod Is Nothing OrElse (methodConversions And
MethodConversionKind
.AllErrorReasons) <> 0 OrElse