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