Binding\Binder_Attributes.vb (8)
176Dim resultKind As LookupResultKind
186resultKind = LookupResultKind.NotATypeOrNamespace
241Dim resultKind = LookupResultKind.Good
281resultKind = LookupResult.WorseResultKind(resultKind, LookupResultKind.Empty)
283resultKind = LookupResult.WorseResultKind(resultKind, LookupResultKind.Inaccessible)
286Dim constructorsGroup = New BoundMethodGroup(node.Name, Nothing, accessibleConstructors, LookupResultKind.Good, Nothing, QualificationKind.QualifiedViaTypeName)
297resultKind = LookupResult.WorseResultKind(resultKind, LookupResultKind.OverloadResolutionFailure)
372Return New BoundAttribute(node, methodSym, boundArguments, defaultArguments, boundNamedArguments, resultKind, type, hasErrors:=resultKind <> LookupResultKind.Good)
Binding\Binder_Expressions.vb (31)
289Return New BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray(Of Symbol).Empty, ImmutableArray(Of BoundExpression).Empty, resultType, hasErrors:=True)
297Return New BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(expr), resultType, hasErrors:=True)
304Private Shared Function BadExpression(node As SyntaxNode, expr As BoundExpression, resultKind As LookupResultKind, resultType As TypeSymbol) As BoundBadExpression
313Return New BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray(Of Symbol).Empty, exprs, resultType, hasErrors:=True)
317Return BadExpression(LookupResultKind.Empty, expr)
321Private Shared Function BadExpression(resultKind As LookupResultKind, wrappedExpression As BoundExpression) As BoundBadExpression
730If group.ResultKind = LookupResultKind.Inaccessible Then
737ElseIf group.ResultKind = LookupResultKind.Good AndAlso group.TypeArgumentsOpt IsNot Nothing Then
749If group.ResultKind = LookupResultKind.Inaccessible Then
953Return BadExpression(node, receiver, LookupResultKind.NotAValue, ErrorTypeSymbol.UnknownResultType)
1261Return BadExpression(syntax, expr, LookupResultKind.NotAValue, ErrorTypeSymbol.UnknownResultType)
1269Return BadExpression(syntax, expr, LookupResultKind.NotAValue, ErrorTypeSymbol.UnknownResultType)
1297Return BadExpression(syntax, expr, LookupResultKind.NotAValue, propertySymbol.Type)
1304Return BadExpression(syntax, expr, LookupResultKind.NotAValue, ErrorTypeSymbol.UnknownResultType)
1456If address.MethodGroup.ResultKind = LookupResultKind.Inaccessible Then
1464Debug.Assert(address.MethodGroup.ResultKind = LookupResultKind.Good)
1724expression = BadExpression(node, expression, LookupResultKind.NotAVariable, ErrorTypeSymbol.UnknownResultType)
2850Return New BoundMethodGroup(node, Nothing, accessibleConstructors, LookupResultKind.Good, left,
3089Dim resultKind As LookupResultKind = lookupResult.Kind
3093resultKind <> LookupResultKind.Inaccessible) Then
3094Debug.Assert(resultKind <> LookupResultKind.Good)
3101(lookupResult.Kind = LookupResultKind.WrongArity OrElse lookupResult.Kind = LookupResultKind.WrongArityAndStopLookup) Then
3125Debug.Assert(lookupResult.Kind = LookupResultKind.Ambiguous)
3155Debug.Assert(lookupResult.Kind = LookupResultKind.Good OrElse lookupResult.Kind = LookupResultKind.Inaccessible)
3386Debug.Assert(lookupResult.Kind = LookupResultKind.Ambiguous)
3599LookupResultKind.Empty,
4740If lookupResult.Kind = LookupResultKind.Good AndAlso lookupResult.Symbols(0).Kind = SymbolKind.Method Then
4792If lookupResult.Kind = LookupResultKind.Good AndAlso lookupResult.Symbols(0).Kind = SymbolKind.Property Then
4838If lookupResult.Kind = LookupResultKind.Good AndAlso lookupResult.Symbols(0).Kind = SymbolKind.Method Then
Binding\Binder_Operators.vb (5)
606LookupResultKind.Good, Nothing,
617result = ReportOverloadResolutionFailureAndProduceBoundNode(node, LookupResultKind.Good,
755LookupResultKind.Good, Nothing,
1257LookupResultKind.Good, Nothing,
1268result = ReportOverloadResolutionFailureAndProduceBoundNode(node, LookupResultKind.Good,
Binding\LookupResult.vb (69)
43Public Function ToCandidateReason(resultKind As LookupResultKind) As CandidateReason
45Case LookupResultKind.Empty, LookupResultKind.EmptyAndStopLookup
47Case LookupResultKind.OverloadResolutionFailure
49Case LookupResultKind.NotATypeOrNamespace
51Case LookupResultKind.NotAnEvent
53Case LookupResultKind.LateBound
55Case LookupResultKind.NotAnAttributeType
57Case LookupResultKind.NotAWithEventsMember
59Case LookupResultKind.WrongArity, LookupResultKind.WrongArityAndStopLookup
61Case LookupResultKind.NotCreatable
63Case LookupResultKind.Inaccessible
65Case LookupResultKind.NotAValue
67Case LookupResultKind.NotAVariable
69Case LookupResultKind.NotReferencable
71Case LookupResultKind.MustNotBeInstance, LookupResultKind.MustBeInstance
73Case LookupResultKind.Ambiguous
75Case LookupResultKind.MemberGroup
93Friend ReadOnly Kind As LookupResultKind
99Friend Sub New(kind As LookupResultKind, symbol As Symbol, diagInfo As DiagnosticInfo)
113Public Shared ReadOnly Empty As New SingleLookupResult(LookupResultKind.Empty, Nothing, Nothing)
116Return New SingleLookupResult(LookupResultKind.Good, sym, Nothing)
124Return New SingleLookupResult(LookupResultKind.Ambiguous, syms.First(), diagInfo)
128Return New SingleLookupResult(LookupResultKind.WrongArityAndStopLookup, sym, New BadSymbolDiagnostic(sym, err))
131Public Shared ReadOnly EmptyAndStopLookup As New SingleLookupResult(LookupResultKind.EmptyAndStopLookup, Nothing, Nothing)
134Return New SingleLookupResult(LookupResultKind.WrongArityAndStopLookup, sym, diagInfo)
139Return New SingleLookupResult(LookupResultKind.WrongArity, sym, diagInfo)
144Return New SingleLookupResult(LookupResultKind.WrongArity, sym, New BadSymbolDiagnostic(sym, err))
149Return New SingleLookupResult(LookupResultKind.MustNotBeInstance, sym, New BadSymbolDiagnostic(sym, err, Array.Empty(Of Object)))
154Return New SingleLookupResult(LookupResultKind.MustBeInstance, sym, Nothing)
160Return New SingleLookupResult(LookupResultKind.Inaccessible, sym, diagInfo)
164Return New SingleLookupResult(LookupResultKind.NotAnAttributeType, sym, [error])
170Return Kind >= LookupResultKind.WrongArityAndStopLookup
176Return Kind = LookupResultKind.Good OrElse Kind = LookupResultKind.Ambiguous
182Return Kind = LookupResultKind.Good
188Return Kind = LookupResultKind.Ambiguous
237Private _kind As LookupResultKind
252Public ReadOnly Property Kind As LookupResultKind
261Return _kind >= LookupResultKind.EmptyAndStopLookup
268Return _kind = LookupResultKind.Good
274Return _kind = LookupResultKind.Good OrElse _kind = LookupResultKind.Ambiguous
280Return _kind = LookupResultKind.Ambiguous
286Return _kind = LookupResultKind.WrongArity OrElse _kind = LookupResultKind.WrongArityAndStopLookup
347_kind = LookupResultKind.Empty
364_kind = LookupResultKind.Empty
371Return _kind = LookupResultKind.Empty AndAlso _symList.Count = 0 AndAlso _diagInfo Is Nothing
375Private Sub SetFrom(kind As LookupResultKind, sym As Symbol, diagInfo As DiagnosticInfo)
424SetFrom(LookupResultKind.Ambiguous, syms(0), diagInfo)
437If other.Kind > Me.Kind AndAlso Me.Kind < LookupResultKind.Ambiguous Then
445If other.Kind > Me.Kind AndAlso Me.Kind < LookupResultKind.Ambiguous Then
543ElseIf Me.Kind <> LookupResultKind.Inaccessible OrElse Me.Kind > other.Kind Then
574ElseIf Me.Kind <> LookupResultKind.Inaccessible OrElse Me.Kind > other.Kind OrElse
614ElseIf Me.Kind <> LookupResultKind.Inaccessible OrElse Me.Kind > other.Kind OrElse
635ElseIf Me.Kind <> LookupResultKind.Inaccessible OrElse Me.Kind > other.Kind Then
638Debug.Assert(Me.Kind = LookupResultKind.Inaccessible)
1042Friend Shared Function WorseResultKind(resultKind1 As LookupResultKind, resultKind2 As LookupResultKind) As LookupResultKind
1043If resultKind1 = LookupResultKind.Empty Then
1044Return If(resultKind2 = LookupResultKind.Good, LookupResultKind.Empty, resultKind2)
1047If resultKind2 = LookupResultKind.Empty Then
1048Return If(resultKind1 = LookupResultKind.Good, LookupResultKind.Empty, resultKind1)
Compilation\SyntaxTreeSemanticModel.vb (15)
280Return SymbolInfoFactory.Create(allSymbols, LookupResultKind.NotATypeOrNamespace)
482Return SymbolInfoFactory.Create(typeParameters, LookupResultKind.NotReferencable)
501Return SymbolInfoFactory.Create(symbols, LookupResultKind.Empty)
504Return SymbolInfoFactory.Create(symbols, If(symbols.Length = 1, LookupResultKind.Good, LookupResultKind.Ambiguous))
701Private Function GetImplementedMemberAndResultKind(symbolBuilder As ArrayBuilder(Of Symbol), memberName As QualifiedNameSyntax) As LookupResultKind
704Dim resultKind As LookupResultKind = LookupResultKind.Good
758handlesClause As HandlesClauseItemSyntax) As LookupResultKind
760Dim resultKind As LookupResultKind = LookupResultKind.Good
789Dim resultKind As LookupResultKind = GetImplementedMemberAndResultKind(implementedMemberBuilder, memberName)
799Dim resultKind As LookupResultKind = GetHandledEventOrContainerSymbolsAndResultKind(eventSymbolBuilder:=builder,
813Dim resultKind As LookupResultKind = GetHandledEventOrContainerSymbolsAndResultKind(eventSymbolBuilder:=Nothing,
827Dim resultKind As LookupResultKind = GetHandledEventOrContainerSymbolsAndResultKind(eventSymbolBuilder:=Nothing,
Generated\BoundNodes.xml.Generated.vb (16)
586Public Sub New(syntax As SyntaxNode, resultKind As LookupResultKind, symbols As ImmutableArray(Of Symbol), childBoundNodes As ImmutableArray(Of BoundExpression), type As TypeSymbol, Optional hasErrors As Boolean = False)
603Private ReadOnly _ResultKind As LookupResultKind
604Public Overrides ReadOnly Property ResultKind As LookupResultKind
629Public Function Update(resultKind As LookupResultKind, symbols As ImmutableArray(Of Symbol), childBoundNodes As ImmutableArray(Of BoundExpression), type As TypeSymbol) As BoundBadExpression
2682Public Sub New(syntax As SyntaxNode, typeArgumentsOpt As BoundTypeArguments, methods As ImmutableArray(Of MethodSymbol), pendingExtensionMethodsOpt As ExtensionMethodGroup, resultKind As LookupResultKind, receiverOpt As BoundExpression, qualificationKind As QualificationKind, Optional hasErrors As Boolean = False)
2715Private ReadOnly _ResultKind As LookupResultKind
2716Public Overrides ReadOnly Property ResultKind As LookupResultKind
2727Public Function Update(typeArgumentsOpt As BoundTypeArguments, methods As ImmutableArray(Of MethodSymbol), pendingExtensionMethodsOpt As ExtensionMethodGroup, resultKind As LookupResultKind, receiverOpt As BoundExpression, qualificationKind As QualificationKind) As BoundMethodGroup
2740Public Sub New(syntax As SyntaxNode, properties As ImmutableArray(Of PropertySymbol), resultKind As LookupResultKind, receiverOpt As BoundExpression, qualificationKind As QualificationKind, Optional hasErrors As Boolean = False)
2757Private ReadOnly _ResultKind As LookupResultKind
2758Public Overrides ReadOnly Property ResultKind As LookupResultKind
2769Public Function Update(properties As ImmutableArray(Of PropertySymbol), resultKind As LookupResultKind, receiverOpt As BoundExpression, qualificationKind As QualificationKind) As BoundPropertyGroup
3133Public Sub New(syntax As SyntaxNode, constructor As MethodSymbol, constructorArguments As ImmutableArray(Of BoundExpression), constructorDefaultArguments As BitVector, namedArguments As ImmutableArray(Of BoundExpression), resultKind As LookupResultKind, type As TypeSymbol, Optional hasErrors As Boolean = False)
3176Private ReadOnly _ResultKind As LookupResultKind
3177Public Overrides ReadOnly Property ResultKind As LookupResultKind
3188Public Function Update(constructor As MethodSymbol, constructorArguments As ImmutableArray(Of BoundExpression), constructorDefaultArguments As BitVector, namedArguments As ImmutableArray(Of BoundExpression), resultKind As LookupResultKind, type As TypeSymbol) As BoundAttribute
Lowering\LocalRewriter\LocalRewriter_NullableHelpers.vb (4)
26Return New BoundBadExpression(expr.Syntax, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(expr), nullableType, hasErrors:=True)
206Return If(isOptional, Nothing, New BoundBadExpression(expr.Syntax, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(expr), expr.Type.GetNullableUnderlyingType(), hasErrors:=True))
255Return New BoundBadExpression(expr.Syntax, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(expr), expr.Type.GetNullableUnderlyingType(), hasErrors:=True)
283Return New BoundBadExpression(expr.Syntax, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(expr),
Lowering\LocalRewriter\LocalRewriter_ObjectCreation.vb (4)
74newGuid = New BoundBadExpression(node.Syntax, LookupResultKind.NotCreatable, ImmutableArray(Of Symbol).Empty, ImmutableArray(Of BoundExpression).Empty, ErrorTypeSymbol.UnknownResultType, hasErrors:=True)
83callGetTypeFromCLSID = New BoundBadExpression(node.Syntax, LookupResultKind.OverloadResolutionFailure, ImmutableArray(Of Symbol).Empty, ImmutableArray(Of BoundExpression).Empty, ErrorTypeSymbol.UnknownResultType, hasErrors:=True)
94rewrittenObjectCreation = New BoundBadExpression(node.Syntax, LookupResultKind.OverloadResolutionFailure, ImmutableArray(Of Symbol).Empty, ImmutableArray(Of BoundExpression).Empty, node.Type, hasErrors:=True)
153result = New BoundBadExpression(syntax, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray(Of BoundExpression).Empty, typeParameter, hasErrors:=True)
Lowering\LocalRewriter\LocalRewriter_SyncLock.vb (2)
225Return New BoundBadExpression(syntaxNode, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, parameters, ErrorTypeSymbol.UnknownResultType, hasErrors:=True).ToStatement()
249boundMonitorExitCall = New BoundBadExpression(syntaxNode, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(boundLockObject), ErrorTypeSymbol.UnknownResultType, hasErrors:=True)