15 instantiations of SingleLookupResult
Microsoft.CodeAnalysis.VisualBasic (15)
Binding\Binder_Lookup.vb (3)
815
New
SingleLookupResult
(LookupResultKind.Good, sym, Nothing),
1275
singleResult = New
SingleLookupResult
(LookupResultKind.NotReferencable, binder.GetErrorSymbol(name, useSiteError), useSiteError)
1579
lookupResult.SetFrom(New
SingleLookupResult
(LookupResultKind.Ambiguous, symbols.First, ambiguityDiagnostics))
Binding\LookupResult.vb (12)
113
Public Shared ReadOnly Empty As New
SingleLookupResult
(LookupResultKind.Empty, Nothing, Nothing)
116
Return New
SingleLookupResult
(LookupResultKind.Good, sym, Nothing)
124
Return New
SingleLookupResult
(LookupResultKind.Ambiguous, syms.First(), diagInfo)
128
Return New
SingleLookupResult
(LookupResultKind.WrongArityAndStopLookup, sym, New BadSymbolDiagnostic(sym, err))
131
Public Shared ReadOnly EmptyAndStopLookup As New
SingleLookupResult
(LookupResultKind.EmptyAndStopLookup, Nothing, Nothing)
134
Return New
SingleLookupResult
(LookupResultKind.WrongArityAndStopLookup, sym, diagInfo)
139
Return New
SingleLookupResult
(LookupResultKind.WrongArity, sym, diagInfo)
144
Return New
SingleLookupResult
(LookupResultKind.WrongArity, sym, New BadSymbolDiagnostic(sym, err))
149
Return New
SingleLookupResult
(LookupResultKind.MustNotBeInstance, sym, New BadSymbolDiagnostic(sym, err, Array.Empty(Of Object)))
154
Return New
SingleLookupResult
(LookupResultKind.MustBeInstance, sym, Nothing)
160
Return New
SingleLookupResult
(LookupResultKind.Inaccessible, sym, diagInfo)
164
Return New
SingleLookupResult
(LookupResultKind.NotAnAttributeType, sym, [error])
63 references to SingleLookupResult
Microsoft.CodeAnalysis.VisualBasic (54)
Binding\Binder_Attributes.vb (1)
226
lookupResult.SetFrom(
SingleLookupResult
.NotAnAttributeType(symbol, diagInfo))
Binding\Binder_Lambda.vb (1)
1128
lookupResult.SetFrom(
SingleLookupResult
.EmptyAndStopLookup)
Binding\Binder_Lookup.vb (19)
121
<[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As
SingleLookupResult
125
Return
SingleLookupResult
.Empty
131
Return
SingleLookupResult
.Good(sym)
135
Return
SingleLookupResult
.Empty
150
Return
SingleLookupResult
.Empty
163
Return
SingleLookupResult
.Empty
172
Return
SingleLookupResult
.Empty
184
Return
SingleLookupResult
.WrongArity(sym, WrongArityErrid(actualArity, arity))
189
Return
SingleLookupResult
.WrongArity(unwrappedSym, WrongArityErrid(0, arity))
198
Return
SingleLookupResult
.WrongArity(unwrappedSym, WrongArityErrid(0, arity))
210
Return
SingleLookupResult
.WrongArityAndStopLookup(sym, WrongArityErrid(actualArity, arity))
217
Return
SingleLookupResult
.WrongArityAndStopLookup(sym, WrongArityErrid(0, arity))
226
Return
SingleLookupResult
.Inaccessible(sym, GetInaccessibleErrorInfo(sym))
231
Return Global.Microsoft.CodeAnalysis.VisualBasic.
SingleLookupResult
.MustNotBeInstance(sym, Global.Microsoft.CodeAnalysis.VisualBasic.ERRID.ERR_ObjectReferenceNotSupplied)
233
Return Global.Microsoft.CodeAnalysis.VisualBasic.
SingleLookupResult
.MustBeInstance(sym) ' there is no error message for this
236
Return
SingleLookupResult
.Good(sym)
442
Dim currentResult As
SingleLookupResult
= binder.CheckViability(sym, arity, options, Nothing, useSiteInfo)
1184
lookupResult.SetFrom(
SingleLookupResult
.Empty)
1271
Dim singleResult As
SingleLookupResult
Binding\Binder_Symbols.vb (10)
755
suppressUseSiteError As Boolean) As
SingleLookupResult
764
suppressUseSiteError As Boolean) As
SingleLookupResult
804
Return
SingleLookupResult
.Good(sym)
814
inGetTypeContext As Boolean) As
SingleLookupResult
819
Return
SingleLookupResult
.Good(binder.ApplyArrayRankSpecifiersToType(elementType, arrayTypeSyntax.RankSpecifiers, diagBag))
828
suppressUseSiteError As Boolean) As
SingleLookupResult
830
Return
SingleLookupResult
.Good(binder.CreateNullableOf(elementType, nullableTypeSyntax, nullableTypeSyntax.ElementType, diagBag))
906
lookupResult.SetFrom(
SingleLookupResult
.WrongArity(lookupResult.SingleSymbol,
1109
binder As Binder) As
SingleLookupResult
1110
Return
SingleLookupResult
.Good(binder.Compilation.GlobalNamespace)
Binding\ExecutableCodeBinder.vb (2)
130
lookupResult.SetFrom(
SingleLookupResult
.Good(labels.Single()))
146
lookupResult.SetFrom(
SingleLookupResult
.Good(bestSymbol))
Binding\LookupResult.vb (21)
115
Public Shared Function Good(sym As Symbol) As
SingleLookupResult
121
generateAmbiguityDiagnostic As Func(Of ImmutableArray(Of Symbol), AmbiguousSymbolDiagnostic)) As
SingleLookupResult
127
Public Shared Function WrongArityAndStopLookup(sym As Symbol, err As ERRID) As
SingleLookupResult
133
Public Shared Function WrongArityAndStopLookup(sym As Symbol, diagInfo As DiagnosticInfo) As
SingleLookupResult
138
diagInfo As DiagnosticInfo) As
SingleLookupResult
143
err As ERRID) As
SingleLookupResult
148
Public Shared Function MustNotBeInstance(sym As Symbol, err As ERRID) As
SingleLookupResult
153
Public Shared Function MustBeInstance(sym As Symbol) As
SingleLookupResult
159
diagInfo As DiagnosticInfo) As
SingleLookupResult
163
Friend Shared Function NotAnAttributeType(sym As Symbol, [error] As DiagnosticInfo) As
SingleLookupResult
387
Public Sub SetFrom(other As
SingleLookupResult
)
407
SetFrom(
SingleLookupResult
.Good(s))
427
SetFrom(
SingleLookupResult
.Good(syms(0)))
444
Public Sub MergePrioritized(other As
SingleLookupResult
)
480
Public Sub MergeAmbiguous(other As
SingleLookupResult
,
534
Public Sub MergeOverloadedOrPrioritizedExtensionMethods(other As
SingleLookupResult
)
595
Public Sub MergeOverloadedOrPrioritized(other As
SingleLookupResult
, checkIfCurrentHasOverloads As Boolean)
626
Public Sub MergeMembersOfTheSameType(other As
SingleLookupResult
, imported As Boolean)
648
Private Sub MergeOverloadedOrAmbiguousInTheSameType(other As
SingleLookupResult
, imported As Boolean)
853
Public Sub MergeMembersOfTheSameNamespace(other As
SingleLookupResult
, sourceModule As ModuleSymbol, options As LookupOptions)
902
Private Function ResolveAmbiguityInTheSameNamespace(other As
SingleLookupResult
, sourceModule As ModuleSymbol, options As LookupOptions) As Integer
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (9)
Binding\LookupTests.vb (9)
42
r1.SetFrom(
SingleLookupResult
.Empty)
48
Dim r2 =
SingleLookupResult
.Good(sym1)
58
r3.SetFrom(
SingleLookupResult
.Ambiguous(ImmutableArray.Create(Of Symbol)(sym1, sym2, sym3), AddressOf GenerateAmbiguity))
70
r4.SetFrom(
SingleLookupResult
.Inaccessible(sym2, New BadSymbolDiagnostic(sym2, ERRID.ERR_InaccessibleSymbol2, sym2)))
81
r5.SetFrom(
SingleLookupResult
.WrongArity(sym3, ERRID.ERR_IndexedNotArrayOrProc))
108
r8.SetFrom(
SingleLookupResult
.Good(sym4))
192
Dim r16 =
SingleLookupResult
.Good(meth1)
194
Dim r17 =
SingleLookupResult
.Good(meth2)
196
Dim r18 =
SingleLookupResult
.Good(meth3)