491 references to LookupResultKind
Microsoft.CodeAnalysis.CSharp (491)
Binder\Binder.ValueChecks.cs (4)
612
Debug.Assert(methodGroup.ResultKind !=
LookupResultKind
.Viable);
642
var
resultKind = (valueKind == BindValueKind.RValue || valueKind == BindValueKind.RValueOrMethodGroup) ?
643
LookupResultKind
.NotAValue :
644
LookupResultKind
.NotAVariable;
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
87
LookupResultKind
.Empty,
Binder\Binder_Attributes.cs (11)
169
LookupResultKind
resultKind =
LookupResultKind
.Viable;
229
LookupResultKind
.Inaccessible :
230
LookupResultKind
.OverloadResolutionFailure);
279
hasErrors: resultKind !=
LookupResultKind
.Viable);
521
var badLHS = BadExpression(nameSyntax, lookupResultKind:
LookupResultKind
.Empty);
527
LookupResultKind
resultKind;
547
Debug.Assert(resultKind ==
LookupResultKind
.Viable || wasError);
592
private Symbol BindNamedAttributeArgumentName(AttributeArgumentSyntax namedArgument, NamedTypeSymbol attributeType, BindingDiagnosticBag diagnostics, out bool wasError, out
LookupResultKind
resultKind)
661
LookupResultKind
.NotAVariable,
674
LookupResultKind
.NotAVariable,
Binder\Binder_Deconstruct.cs (1)
953
resultKind:
LookupResultKind
.Viable,
Binder\Binder_Expressions.cs (74)
108
return BadExpression(syntax,
LookupResultKind
.Empty, ImmutableArray<Symbol>.Empty);
116
return BadExpression(syntax,
LookupResultKind
.Empty, ImmutableArray<Symbol>.Empty, childNode);
124
return BadExpression(syntax,
LookupResultKind
.Empty, ImmutableArray<Symbol>.Empty, childNodes);
130
protected BoundBadExpression BadExpression(SyntaxNode syntax,
LookupResultKind
lookupResultKind)
138
protected BoundBadExpression BadExpression(SyntaxNode syntax,
LookupResultKind
lookupResultKind, BoundExpression childNode)
146
private BoundBadExpression BadExpression(SyntaxNode syntax,
LookupResultKind
resultKind, ImmutableArray<Symbol> symbols)
159
private BoundBadExpression BadExpression(SyntaxNode syntax,
LookupResultKind
resultKind, ImmutableArray<Symbol> symbols, BoundExpression childNode)
172
private BoundBadExpression BadExpression(SyntaxNode syntax,
LookupResultKind
resultKind, ImmutableArray<Symbol> symbols, ImmutableArray<BoundExpression> childNodes, bool wasCompilerGenerated = false)
194
private BoundExpression ToBadExpression(BoundExpression expr,
LookupResultKind
resultKind =
LookupResultKind
.Empty)
197
Debug.Assert(resultKind !=
LookupResultKind
.Viable);
576
return BadExpression(node,
LookupResultKind
.NotAValue);
583
return BadExpression(node,
LookupResultKind
.NotAValue);
854
node,
LookupResultKind
.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(BindToTypeForErrorRecovery(BindValue(node.Expression, BindingDiagnosticBag.Discarded, BindValueKind.RefersToLocation))),
1041
argumentSyntax,
LookupResultKind
.Empty, ImmutableArray<Symbol>.Empty,
1484
bool result = lookupResult.Kind !=
LookupResultKind
.Empty;
1600
if (lookupResult.Kind !=
LookupResultKind
.Empty)
1642
resultKind:
LookupResultKind
.WrongArity,
1770
if (lookupResult.Kind !=
LookupResultKind
.Empty)
1950
private BoundExpression BindNonMethod(SimpleNameSyntax node, Symbol symbol, BindingDiagnosticBag diagnostics,
LookupResultKind
resultKind, bool indexed, bool isError)
2395
return BadExpression(node,
LookupResultKind
.NotLabel);
2754
if (conversion.ResultKind ==
LookupResultKind
.OverloadResolutionFailure)
3236
LookupResultKind
.Viable,
4184
LookupResultKind
.Empty,
4453
LookupResultKind
.NotCreatable, //in this context, anyway
4492
LookupResultKind
.Empty,
4824
resultKind:
LookupResultKind
.Empty,
4835
resultKind:
LookupResultKind
.Empty,
4878
resultKind:
LookupResultKind
.Empty,
5034
resultKind:
LookupResultKind
.Viable,
5046
resultKind:
LookupResultKind
.OverloadResolutionFailure,
5174
type = new ExtendedErrorTypeSymbol(type,
LookupResultKind
.NotCreatable,
5182
type = new ExtendedErrorTypeSymbol(type,
LookupResultKind
.NotCreatable,
5200
return new BoundBadExpression(syntax,
LookupResultKind
.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, CreateErrorType());
5409
return new BoundBadExpression(node,
LookupResultKind
.NotInvocable, StaticCast<Symbol>.From(type.InstanceConstructors), ImmutableArray.Create(argument), type);
5420
sourceDelegate.DelegateInvokeMethod, null, BoundMethodGroupFlags.None, functionType: null, argument,
LookupResultKind
.Viable);
5456
return new BoundBadExpression(node,
LookupResultKind
.OverloadResolutionFailure, StaticCast<Symbol>.From(type.InstanceConstructors), childNodes, type);
5553
return new BoundBadExpression(node,
LookupResultKind
.NotCreatable, ImmutableArray.Create<Symbol?>(type), children.ToImmutableAndFree(), type) { WasCompilerGenerated = wasCompilerGenerated };
5721
LookupResultKind
.Empty,
5741
return BindToTypeForErrorRecovery(ToBadExpression(boundExpression,
LookupResultKind
.NotAValue));
5779
LookupResultKind
resultKind;
5882
resultKind =
LookupResultKind
.NotAValue;
5968
resultKind = isRhsNestedInitializer ?
LookupResultKind
.NotAValue :
LookupResultKind
.NotAVariable;
5993
ref
LookupResultKind
resultKind)
6005
resultKind =
LookupResultKind
.NotAValue;
6035
case
LookupResultKind
.Empty:
6039
case
LookupResultKind
.Inaccessible:
6050
return ToBadExpression(boundMember, (valueKind == BindValueKind.RValue) ?
LookupResultKind
.NotAValue :
LookupResultKind
.NotAVariable);
6348
return BadExpression(elementInitializer,
LookupResultKind
.NotInvocable);
6389
return BadExpression(elementInitializer,
LookupResultKind
.NotInvocable, ImmutableArray<Symbol>.Empty, boundElementInitializerExpressions);
6822
LookupResultKind
resultKind;
6827
resultKind =
LookupResultKind
.NotCreatable;
6831
resultKind =
LookupResultKind
.Inaccessible;
6835
resultKind =
LookupResultKind
.OverloadResolutionFailure;
7020
return new BoundBadExpression(node,
LookupResultKind
.OverloadResolutionFailure, ImmutableArray<Symbol>.Empty, children, interfaceType);
7779
return new BoundBadExpression(node,
LookupResultKind
.Ambiguous, lookupResult.Symbols.AsImmutable(), ImmutableArray.Create(boundLeft), CreateErrorType(rightName), hasErrors: true);
7800
else if (lookupResult.Kind ==
LookupResultKind
.WrongArity)
7810
else if (lookupResult.Kind ==
LookupResultKind
.Empty)
7852
return BadExpression(node,
LookupResultKind
.NotAValue, boundLeft);
8127
LookupResultKind
lookupKind)
8518
LookupResultKind
resultKind,
8678
LookupResultKind
lookupResult,
8758
LookupResultKind
lookupResult,
8803
ref
LookupResultKind
resultKind,
8823
resultKind =
LookupResultKind
.StaticInstanceMismatch;
8832
resultKind =
LookupResultKind
.StaticInstanceMismatch;
8857
Debug.Assert(result.Kind !=
LookupResultKind
.Empty);
9270
return new BoundBadExpression(node,
LookupResultKind
.Empty, ImmutableArray<Symbol>.Empty, childBoundNodes, CreateErrorType(), hasErrors: true);
10122
method, lookupError: null, BoundMethodGroupFlags.None, functionType: null, receiver,
LookupResultKind
.Viable)
10357
LookupResultKind
methodResultKind = methodResolution.ResultKind;
10358
LookupResultKind
extensionMethodResultKind = extensionMethodResolution.ResultKind;
10628
if (node.ResultKind ==
LookupResultKind
.Viable)
Binder\Binder_InterpolatedString.cs (3)
549
LookupResultKind
.Viable,
733
if (outConstructorCall is not BoundObjectCreationExpression { ResultKind:
LookupResultKind
.Viable })
746
if (nonOutConstructorCall is BoundObjectCreationExpression { ResultKind:
LookupResultKind
.Viable })
Binder\Binder_Invocation.cs (12)
121
return BadExpression(node,
LookupResultKind
.Empty, ImmutableArray.Create(symbol), args.Add(receiver), wasCompilerGenerated: true);
150
result = CreateBadCall(node, boundExpression,
LookupResultKind
.Viable, analyzedArguments);
364
return CreateBadCall(node, boundExpression,
LookupResultKind
.Viable, analyzedArguments);
381
result = CreateBadCall(node, boundExpression,
LookupResultKind
.NotInvocable, analyzedArguments);
718
anyApplicableCandidates = resolution.ResultKind ==
LookupResultKind
.Viable && resolution.OverloadResolutionResult.HasAnyApplicableMember;
725
LookupResultKind
resultKind;
758
if (resolution.ResultKind !=
LookupResultKind
.Viable)
1316
argsToParamsOpt: argsToParams, defaultArguments, resultKind:
LookupResultKind
.Viable, type: returnType, hasErrors: gotError);
1917
LookupResultKind
resultKind,
2169
LookupResultKind
resultKind,
2383
LookupResultKind
.OverloadResolutionFailure,
2402
LookupResultKind
.Viable,
Binder\Binder_Lookup.cs (7)
69
if (result.Kind !=
LookupResultKind
.Viable && result.Kind !=
LookupResultKind
.Empty)
227
if (errorType.ResultKind ==
LookupResultKind
.Inaccessible)
417
if (res.Kind ==
LookupResultKind
.Viable)
433
if (res.Kind ==
LookupResultKind
.Viable)
675
if (result == null || result.Kind !=
LookupResultKind
.Viable || (object)symbol == null)
952
result.MergeEqual(new SingleLookupResult(
LookupResultKind
.Viable, sym, null));
Binder\Binder_Operators.cs (39)
52
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null,
LookupResultKind
.Empty, CreateErrorType(), hasErrors: true);
83
LookupResultKind
.Viable,
95
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null,
LookupResultKind
.Empty, CreateErrorType(), hasErrors: true);
109
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null,
LookupResultKind
.NotAVariable, CreateErrorType(), hasErrors: true);
121
LookupResultKind
resultKind;
418
resultKind:
LookupResultKind
.Viable,
518
return new BoundBinaryOperator(node, kind, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null,
LookupResultKind
.Empty, left, right, GetBinaryOperatorErrorType(kind, diagnostics, node), true);
559
return new BoundBinaryOperator(node, BinaryOperatorKind.StringConcatenation, BoundBinaryOperator.UncommonData.UnconvertedInterpolatedStringAddition(stringConstant),
LookupResultKind
.Empty, left, right, right.Type);
577
LookupResultKind
resultKind;
699
out
LookupResultKind
resultKind, out ImmutableArray<MethodSymbol> originalUserDefinedOperators,
797
private static void ReportUnaryOperatorError(CSharpSyntaxNode node, BindingDiagnosticBag diagnostics, string operatorName, BoundExpression operand,
LookupResultKind
resultKind)
805
ErrorCode errorCode = resultKind ==
LookupResultKind
.Ambiguous ?
812
private void ReportAssignmentOperatorError(AssignmentExpressionSyntax node, BinaryOperatorKind kind, BindingDiagnosticBag diagnostics, BoundExpression left, BoundExpression right,
LookupResultKind
resultKind)
831
private void ReportBinaryOperatorError(ExpressionSyntax node, BindingDiagnosticBag diagnostics, SyntaxToken operatorToken, BoundExpression left, BoundExpression right,
LookupResultKind
resultKind)
865
case
LookupResultKind
.Ambiguous:
869
case
LookupResultKind
.OverloadResolutionFailure when operatorToken.Kind() is SyntaxKind.PlusToken && isReadOnlySpanOfByte(left.Type) && isReadOnlySpanOfByte(right.Type):
943
resultKind:
LookupResultKind
.Viable, left, right, type: left.Type, hasErrors: constantValue != null && constantValue.IsBad);
953
resultKind:
LookupResultKind
.Empty, left, right, type: GetBinaryOperatorErrorType(kind, diagnostics, node), hasErrors: true);
963
LookupResultKind
lookupResult;
1313
out
LookupResultKind
resultKind,
1318
resultKind =
LookupResultKind
.OverloadResolutionFailure;
1345
resultKind =
LookupResultKind
.Viable;
1349
resultKind =
LookupResultKind
.Ambiguous;
1353
resultKind =
LookupResultKind
.OverloadResolutionFailure;
1359
resultKind = possiblyBest.HasValue ?
LookupResultKind
.Viable :
LookupResultKind
.Empty;
1413
out
LookupResultKind
resultKind,
1438
resultKind =
LookupResultKind
.Viable;
1453
resultKind =
LookupResultKind
.OverloadResolutionFailure;
1457
resultKind =
LookupResultKind
.Ambiguous;
1462
resultKind =
LookupResultKind
.OverloadResolutionFailure;
1468
resultKind = possiblyBest.HasValue ?
LookupResultKind
.Viable :
LookupResultKind
.Empty;
2281
LookupResultKind
.Empty,
2302
resultKind:
LookupResultKind
.Viable,
2308
LookupResultKind
resultKind;
2742
resultKind:
LookupResultKind
.Empty,
2763
resultKind:
LookupResultKind
.Viable,
2767
LookupResultKind
resultKind;
Binder\Binder_Patterns.cs (4)
366
lengthAccess = new BoundPropertyAccess(node, receiverPlaceholder, initialBindingReceiverIsSubjectToCloning: ThreeState.False, lengthProperty, autoPropertyAccessorKind: AccessorKind.Unknown,
LookupResultKind
.Viable, lengthProperty.Type) { WasCompilerGenerated = true };
370
lengthAccess = new BoundBadExpression(node,
LookupResultKind
.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, CreateErrorType(), hasErrors: true) { WasCompilerGenerated = true };
1583
case
LookupResultKind
.Empty:
1587
case
LookupResultKind
.Inaccessible:
Binder\Binder_Query.cs (6)
302
state.selectOrGroup,
LookupResultKind
.OverloadResolutionFailure, ImmutableArray<Symbol?>.Empty,
736
yExpression = new BoundBadExpression(yExpression.Syntax,
LookupResultKind
.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), CreateErrorType());
742
yExpression = new BoundBadExpression(yExpression.Syntax,
LookupResultKind
.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), yExpression.Type);
803
field2Value = new BoundBadExpression(field2Value.Syntax,
LookupResultKind
.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(field2Value), field2Value.Type, true);
975
receiver = new BoundBadExpression(receiver.Syntax,
LookupResultKind
.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType());
997
receiver = new BoundBadExpression(receiver.Syntax,
LookupResultKind
.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType());
Binder\Binder_Statements.cs (9)
2266
else if (conversion.ResultKind ==
LookupResultKind
.OverloadResolutionFailure)
2662
LookupResultKind
.Viable,
2706
var best = this.UnaryOperatorOverloadResolution(UnaryOperatorKind.True, expr, node, diagnostics, out
LookupResultKind
resultKind, out ImmutableArray<MethodSymbol> originalUserDefinedOperators);
2710
Debug.Assert(resultKind ==
LookupResultKind
.Empty, "How could overload resolution fail if a user-defined true operator was found?");
3916
LookupResultKind
resultKind =
LookupResultKind
.Viable;
3946
resultKind =
LookupResultKind
.Inaccessible;
4015
resultKind:
LookupResultKind
.Viable,
4151
if (call.ResultKind ==
LookupResultKind
.Empty)
Binder\Binder_Symbols.cs (10)
222
case
LookupResultKind
.Empty:
228
case
LookupResultKind
.Viable:
341
return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(GetContainingNamespaceOrType(symbol.Symbol), symbol.Symbol,
LookupResultKind
.NotATypeOrNamespace, diagnosticInfo));
584
return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(left,
LookupResultKind
.NotATypeOrNamespace, diagnostics.Add(ErrorCode.ERR_ColColWithTypeAlias, node.Alias.Location, node.Alias.Identifier.Text)));
1469
receiver = new BoundBadExpression(receiver.Syntax,
LookupResultKind
.Ambiguous, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(receiver), receiver.Type, hasErrors: true).MakeCompilerGenerated();
2239
LookupResultKind
.Ambiguous,
2255
singleResult = new ExtendedErrorTypeSymbol(GetContainingNamespaceOrType(singleResult), singleResult,
LookupResultKind
.NotReferencable, errorInfo); // UNDONE: Review resultkind.
2301
if (result.Kind ==
LookupResultKind
.Empty)
2339
result.Kind ==
LookupResultKind
.NotATypeOrNamespace || result.Kind ==
LookupResultKind
.NotAnAttributeType)
Binder\Binder_TupleOperators.cs (2)
158
LookupResultKind
resultKind;
211
ReportBinaryOperatorError(node, diagnostics, node.OperatorToken, left, right,
LookupResultKind
.Ambiguous);
Binder\Binder_XmlNameAttribute.cs (1)
33
if (lookupResult.Kind ==
LookupResultKind
.Empty)
Binder\ForEachLoopBinder.cs (2)
724
LookupResultKind
.Empty,
933
if (collectionExpr.ResultKind ==
LookupResultKind
.NotAValue)
Binder\LookupResult.cs (19)
65
private
LookupResultKind
_kind;
78
_kind =
LookupResultKind
.Empty;
87
return _kind ==
LookupResultKind
.Empty && _error == null && _symbolList.Count == 0;
93
_kind =
LookupResultKind
.Empty;
98
internal
LookupResultKind
Kind
140
return Kind ==
LookupResultKind
.Viable;
151
return Kind ==
LookupResultKind
.Viable && _symbolList.Count == 1;
157
return new SingleLookupResult(
LookupResultKind
.Viable, symbol, null);
162
return new SingleLookupResult(
LookupResultKind
.WrongArity, symbol, error);
167
return new SingleLookupResult(
LookupResultKind
.Empty, null, null);
172
return new SingleLookupResult(
LookupResultKind
.NotReferencable, symbol, error);
177
return new SingleLookupResult(
LookupResultKind
.StaticInstanceMismatch, symbol, error);
182
return new SingleLookupResult(
LookupResultKind
.Inaccessible, symbol, error);
188
return new SingleLookupResult(
LookupResultKind
.NotInvocable, symbol, diagInfo);
193
return new SingleLookupResult(
LookupResultKind
.NotLabel, symbol, error);
198
return new SingleLookupResult(
LookupResultKind
.NotATypeOrNamespace, symbol, error);
205
return new SingleLookupResult(
LookupResultKind
.NotATypeOrNamespace, symbol, diagInfo);
210
return new SingleLookupResult(
LookupResultKind
.NotAnAttributeType, symbol, error);
266
else if (Kind !=
LookupResultKind
.Viable)
Binder\LookupResultKind.cs (21)
74
public static CandidateReason ToCandidateReason(this
LookupResultKind
resultKind)
78
case
LookupResultKind
.Empty: return CandidateReason.None;
79
case
LookupResultKind
.NotATypeOrNamespace: return CandidateReason.NotATypeOrNamespace;
80
case
LookupResultKind
.NotAnAttributeType: return CandidateReason.NotAnAttributeType;
81
case
LookupResultKind
.WrongArity: return CandidateReason.WrongArity;
82
case
LookupResultKind
.Inaccessible: return CandidateReason.Inaccessible;
83
case
LookupResultKind
.NotCreatable: return CandidateReason.NotCreatable;
84
case
LookupResultKind
.NotReferencable: return CandidateReason.NotReferencable;
85
case
LookupResultKind
.NotAValue: return CandidateReason.NotAValue;
86
case
LookupResultKind
.NotAVariable: return CandidateReason.NotAVariable;
87
case
LookupResultKind
.NotInvocable: return CandidateReason.NotInvocable;
88
case
LookupResultKind
.StaticInstanceMismatch: return CandidateReason.StaticInstanceMismatch;
89
case
LookupResultKind
.OverloadResolutionFailure: return CandidateReason.OverloadResolutionFailure;
90
case
LookupResultKind
.Ambiguous: return CandidateReason.Ambiguous;
91
case
LookupResultKind
.MemberGroup: return CandidateReason.MemberGroup;
93
case
LookupResultKind
.Viable:
103
public static
LookupResultKind
WorseResultKind(this
LookupResultKind
resultKind1,
LookupResultKind
resultKind2)
105
if (resultKind1 ==
LookupResultKind
.Empty)
107
if (resultKind2 ==
LookupResultKind
.Empty)
Binder\MethodGroupResolution.cs (5)
25
public readonly
LookupResultKind
ResultKind;
32
public MethodGroupResolution(Symbol otherSymbol,
LookupResultKind
resultKind, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics)
42
LookupResultKind
resultKind,
49
Debug.Assert(resultKind !=
LookupResultKind
.Ambiguous); // HasAnyApplicableMethod is expecting Viable methods.
76
(this.ResultKind ==
LookupResultKind
.Viable) &&
Binder\Semantics\Conversions\Conversion.cs (6)
1044
internal
LookupResultKind
ResultKind
1053
return
LookupResultKind
.Viable;
1057
return
LookupResultKind
.OverloadResolutionFailure;
1061
return this.Kind == ConversionKind.NoConversion ?
LookupResultKind
.Empty :
LookupResultKind
.Viable;
1068
return
LookupResultKind
.OverloadResolutionFailure;
Binder\Semantics\Conversions\Conversions.cs (1)
354
resolution.ResultKind ==
LookupResultKind
.Viable)
Binder\Semantics\OverloadResolution\MethodGroup.cs (10)
23
internal
LookupResultKind
ResultKind { get; private set; }
34
LookupResultKind
resultKind =
LookupResultKind
.Viable,
45
LookupResultKind
resultKind =
LookupResultKind
.Viable,
64
LookupResultKind
resultKind =
LookupResultKind
.Viable,
75
private void PopulateHelper(BoundExpression receiverOpt,
LookupResultKind
resultKind, DiagnosticInfo error)
90
this.ResultKind =
LookupResultKind
.Empty;
129
Debug.Assert(this.ResultKind ==
LookupResultKind
.Empty);
Binder\SingleLookupResult.cs (2)
22
internal readonly
LookupResultKind
Kind;
30
internal SingleLookupResult(
LookupResultKind
kind, Symbol symbol, DiagnosticInfo error)
Binder\SwitchBinder.cs (1)
446
return new BoundBadExpression(node,
LookupResultKind
.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(switchGoverningExpression), switchGoverningType ?? CreateErrorType());
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
151
if (res.Kind ==
LookupResultKind
.Viable)
BoundTree\BoundExpression.cs (6)
118
public virtual
LookupResultKind
ResultKind
122
return
LookupResultKind
.Viable;
275
public override
LookupResultKind
ResultKind
283
return
LookupResultKind
.Viable;
345
public override
LookupResultKind
ResultKind
349
return !this.OriginalIndexersOpt.IsDefault ?
LookupResultKind
.OverloadResolutionFailure : base.ResultKind;
BoundTree\Constructors.cs (21)
20
: this(syntax, receiver, fieldSymbol, constantValueOpt,
LookupResultKind
.Viable, fieldSymbol.Type, hasErrors)
29
LookupResultKind
resultKind,
41
LookupResultKind
resultKind,
53
LookupResultKind
resultKind,
99
LookupResultKind
resultKind,
117
LookupResultKind
resultKind,
131
LookupResultKind
resultKind,
135
resultKind = resultKind.WorseResultKind(
LookupResultKind
.OverloadResolutionFailure);
223
resultKind:
LookupResultKind
.Viable,
435
LookupResultKind
resultKind,
456
LookupResultKind
resultKind,
469
LookupResultKind
resultKind,
495
LookupResultKind
resultKind,
521
LookupResultKind
resultKind,
599
public BoundBadExpression(SyntaxNode syntax,
LookupResultKind
resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol type)
721
LookupResultKind
resultKind,
735
LookupResultKind
resultKind,
749
LookupResultKind
resultKind,
761
LookupResultKind
resultKind,
778
LookupResultKind
resultKind,
785
public BoundIncrementOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion,
LookupResultKind
resultKind, TypeSymbol type)
BoundTree\VariablePendingInference.cs (1)
104
LookupResultKind
.Viable,
Compilation\CSharpSemanticModel.cs (70)
380
LookupResultKind
resultKind =
LookupResultKind
.Ambiguous;
388
resultKind =
LookupResultKind
.OverloadResolutionFailure;
1903
boundExpr, boundNodeForSyntacticParent, binderOpt, options, out bool isDynamic, out
LookupResultKind
resultKind, out ImmutableArray<Symbol> unusedMemberGroup);
1907
LookupResultKind
highestResultKind;
1913
if ((symbols.Count != 1 || resultKind ==
LookupResultKind
.OverloadResolutionFailure) && highestSymbols.Count > 0)
1919
else if (highestResultKind !=
LookupResultKind
.Empty && highestResultKind < resultKind)
1945
if (resultKind ==
LookupResultKind
.Empty)
1949
return SymbolInfoFactory.Create(ImmutableArray<Symbol>.Empty,
LookupResultKind
.Empty, isDynamic);
1969
if (resultKind ==
LookupResultKind
.Viable && symbols.Count > 1)
1971
resultKind =
LookupResultKind
.OverloadResolutionFailure;
2280
LookupResultKind
resultKind;
2326
LookupResultKind
resultKind = originalErrorSymbol.ResultKind;
2327
if (resultKind !=
LookupResultKind
.Empty)
3347
out
LookupResultKind
resultKind,
3352
resultKind =
LookupResultKind
.Viable;
3372
if (resultKind ==
LookupResultKind
.NotCreatable)
3378
resultKind =
LookupResultKind
.Empty;
3400
((BoundBadExpression)boundNodeForSyntacticParent).ResultKind ==
LookupResultKind
.NotCreatable)
3402
resultKind =
LookupResultKind
.NotCreatable;
3503
resultKind =
LookupResultKind
.Empty;
3512
case BoundKind.EventAccess when boundNodeForSyntacticParent is BoundEventAssignmentOperator { ResultKind:
LookupResultKind
.Viable } parentOperator &&
3593
Debug.Assert(resultKind !=
LookupResultKind
.Viable);
3672
resultKind = resultKind.WorseResultKind(
LookupResultKind
.OverloadResolutionFailure);
3730
private static ParameterSymbol GetThisParameter(TypeSymbol typeOfThis, NamedTypeSymbol containingType, Symbol containingMember, out
LookupResultKind
resultKind)
3735
resultKind =
LookupResultKind
.NotReferencable;
3749
resultKind =
LookupResultKind
.StaticInstanceMismatch;
3758
resultKind =
LookupResultKind
.NotReferencable;
3765
resultKind =
LookupResultKind
.Viable;
3773
resultKind =
LookupResultKind
.NotReferencable;
3786
resultKind =
LookupResultKind
.NotReferencable;
3793
private static void GetSymbolsAndResultKind(BoundUnaryOperator unaryOperator, out bool isDynamic, ref
LookupResultKind
resultKind, ref OneOrMany<Symbol> symbols)
3798
if (operandType == 0 || operandType == UnaryOperatorKind.UserDefined || unaryOperator.ResultKind !=
LookupResultKind
.Viable)
3816
private static void GetSymbolsAndResultKind(BoundIncrementOperator increment, out bool isDynamic, ref
LookupResultKind
resultKind, ref OneOrMany<Symbol> symbols)
3821
if (operandType == 0 || operandType == UnaryOperatorKind.UserDefined || increment.ResultKind !=
LookupResultKind
.Viable)
3840
private static void GetSymbolsAndResultKind(BoundBinaryOperator binaryOperator, out bool isDynamic, ref
LookupResultKind
resultKind, ref OneOrMany<Symbol> symbols)
3846
if (operandType == 0 || operandType == BinaryOperatorKind.UserDefined || binaryOperator.ResultKind !=
LookupResultKind
.Viable || binaryOperator.OperatorKind.IsLogical())
3913
private static void GetSymbolsAndResultKind(BoundCompoundAssignmentOperator compoundAssignment, out bool isDynamic, ref
LookupResultKind
resultKind, ref OneOrMany<Symbol> symbols)
3919
if (operandType == 0 || operandType == BinaryOperatorKind.UserDefined || compoundAssignment.ResultKind !=
LookupResultKind
.Viable)
3939
private static void GetSymbolsAndResultKind(BoundExpression node, Symbol symbolOpt, ImmutableArray<MethodSymbol> originalCandidates, out OneOrMany<Symbol> symbols, out
LookupResultKind
resultKind)
3954
resultKind =
LookupResultKind
.Empty;
3965
ref
LookupResultKind
resultKind,
3987
Debug.Assert(resultKind !=
LookupResultKind
.Viable ||
4018
ref
LookupResultKind
resultKind,
4048
Debug.Assert(resultKind !=
LookupResultKind
.Viable);
4065
Debug.Assert(resultKind !=
LookupResultKind
.Viable);
4066
resultKind = resultKind.WorseResultKind(
LookupResultKind
.OverloadResolutionFailure);
4236
out
LookupResultKind
resultKind,
4245
if (resultKind ==
LookupResultKind
.Empty)
4247
resultKind =
LookupResultKind
.Viable;
4272
resultKind =
LookupResultKind
.Viable;
4276
resultKind = call.ResultKind.WorseResultKind(
LookupResultKind
.OverloadResolutionFailure);
4343
resultKind = resultKind.WorseResultKind(
LookupResultKind
.MemberGroup);
4350
resultKind = resultKind.WorseResultKind(
LookupResultKind
.OverloadResolutionFailure);
4365
resultKind = resultKind.WorseResultKind(
LookupResultKind
.OverloadResolutionFailure);
4375
if (!isDynamic && resultKind >
LookupResultKind
.OverloadResolutionFailure)
4377
resultKind =
LookupResultKind
.OverloadResolutionFailure;
4389
out
LookupResultKind
resultKind,
4397
if (resultKind ==
LookupResultKind
.Empty)
4399
resultKind =
LookupResultKind
.Viable;
4421
resultKind =
LookupResultKind
.Viable;
4425
resultKind = indexer.ResultKind.WorseResultKind(
LookupResultKind
.OverloadResolutionFailure);
4460
if (resultKind >
LookupResultKind
.OverloadResolutionFailure)
4462
resultKind =
LookupResultKind
.OverloadResolutionFailure;
4565
var
resultKind =
LookupResultKind
.Empty;
4707
ref
LookupResultKind
resultKind,
4717
var
singleKind = singleResult.Kind;
4726
resultKind =
LookupResultKind
.Empty;
4739
Debug.Assert((methods.Count == 0) == (resultKind ==
LookupResultKind
.Empty));
Compilation\SymbolInfoFactory.cs (3)
19
internal static SymbolInfo Create(ImmutableArray<Symbol> symbols,
LookupResultKind
resultKind, bool isDynamic)
22
internal static SymbolInfo Create(OneOrMany<Symbol> symbols,
LookupResultKind
resultKind, bool isDynamic)
35
else if (resultKind ==
LookupResultKind
.Viable)
Compilation\SyntaxTreeSemanticModel.cs (2)
267
result = SymbolInfoFactory.Create(symbols,
LookupResultKind
.Viable, isDynamic: false);
270
result = SymbolInfoFactory.Create(symbols,
LookupResultKind
.Ambiguous, isDynamic: false);
Compiler\MethodBodySynthesizer.cs (2)
56
resultKind:
LookupResultKind
.Viable,
504
resultKind:
LookupResultKind
.Viable,
Generated\BoundNodes.xml.Generated.cs (48)
980
public BoundBadExpression(SyntaxNode syntax,
LookupResultKind
resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type, bool hasErrors = false)
992
public override
LookupResultKind
ResultKind { get; }
999
public BoundBadExpression Update(
LookupResultKind
resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type)
1183
public BoundUnaryOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt,
LookupResultKind
resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false)
1205
public override
LookupResultKind
ResultKind { get; }
1211
public BoundUnaryOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt,
LookupResultKind
resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type)
1225
public BoundIncrementOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion,
LookupResultKind
resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false)
1253
public override
LookupResultKind
ResultKind { get; }
1259
public BoundIncrementOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion,
LookupResultKind
resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type)
1446
public BoundFunctionPointerInvocation(SyntaxNode syntax, BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt,
LookupResultKind
resultKind, TypeSymbol type, bool hasErrors = false)
1464
public override
LookupResultKind
ResultKind { get; }
1469
public BoundFunctionPointerInvocation Update(BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt,
LookupResultKind
resultKind, TypeSymbol type)
1661
public BoundBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data,
LookupResultKind
resultKind, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false)
1676
public override
LookupResultKind
ResultKind { get; }
1681
public BoundBinaryOperator Update(BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data,
LookupResultKind
resultKind, BoundExpression left, BoundExpression right, TypeSymbol type)
1733
public BoundUserDefinedConditionalLogicalOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, TypeSymbol? constrainedToTypeOpt,
LookupResultKind
resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false)
1758
public override
LookupResultKind
ResultKind { get; }
1764
public BoundUserDefinedConditionalLogicalOperator Update(BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, TypeSymbol? constrainedToTypeOpt,
LookupResultKind
resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type)
1778
public BoundCompoundAssignmentOperator(SyntaxNode syntax, BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion,
LookupResultKind
resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false)
1805
public override
LookupResultKind
ResultKind { get; }
1811
public BoundCompoundAssignmentOperator Update(BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion,
LookupResultKind
resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type)
5724
protected BoundMethodOrPropertyGroup(BoundKind kind, SyntaxNode syntax, BoundExpression? receiverOpt,
LookupResultKind
resultKind, bool hasErrors = false)
5733
public override
LookupResultKind
ResultKind { get; }
6075
public BoundMethodGroup(SyntaxNode syntax, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, ImmutableArray<MethodSymbol> methods, Symbol? lookupSymbolOpt, DiagnosticInfo? lookupError, BoundMethodGroupFlags? flags, FunctionTypeSymbol? functionType, BoundExpression? receiverOpt,
LookupResultKind
resultKind, bool hasErrors = false)
6102
public BoundMethodGroup Update(ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, ImmutableArray<MethodSymbol> methods, Symbol? lookupSymbolOpt, DiagnosticInfo? lookupError, BoundMethodGroupFlags? flags, FunctionTypeSymbol? functionType, BoundExpression? receiverOpt,
LookupResultKind
resultKind)
6116
public BoundPropertyGroup(SyntaxNode syntax, ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt,
LookupResultKind
resultKind, bool hasErrors = false)
6130
public BoundPropertyGroup Update(ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt,
LookupResultKind
resultKind)
6144
public BoundCall(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool isDelegateCall, bool expanded, bool invokedAsExtensionMethod, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments,
LookupResultKind
resultKind, ImmutableArray<MethodSymbol> originalMethodsOpt, TypeSymbol type, bool hasErrors = false)
6179
public override
LookupResultKind
ResultKind { get; }
6185
public BoundCall Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool isDelegateCall, bool expanded, bool invokedAsExtensionMethod, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments,
LookupResultKind
resultKind, ImmutableArray<MethodSymbol> originalMethodsOpt, TypeSymbol type)
6238
public BoundAttribute(SyntaxNode syntax, MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments,
LookupResultKind
resultKind, TypeSymbol type, bool hasErrors = false)
6264
public override
LookupResultKind
ResultKind { get; }
6269
public BoundAttribute Update(MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments,
LookupResultKind
resultKind, TypeSymbol type)
6744
public BoundObjectInitializerMember(SyntaxNode syntax, Symbol? memberSymbol, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments,
LookupResultKind
resultKind, AccessorKind accessorKind, TypeSymbol receiverType, TypeSymbol type, bool hasErrors = false)
6772
public override
LookupResultKind
ResultKind { get; }
6779
public BoundObjectInitializerMember Update(Symbol? memberSymbol, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments,
LookupResultKind
resultKind, AccessorKind accessorKind, TypeSymbol receiverType, TypeSymbol type)
6866
public BoundCollectionElementInitializer(SyntaxNode syntax, MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod,
LookupResultKind
resultKind, TypeSymbol type, bool hasErrors = false)
6892
public override
LookupResultKind
ResultKind { get; }
6897
public BoundCollectionElementInitializer Update(MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod,
LookupResultKind
resultKind, TypeSymbol type)
7258
public BoundFieldAccess(SyntaxNode syntax, BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt,
LookupResultKind
resultKind, bool isByValue, bool isDeclaration, TypeSymbol type, bool hasErrors = false)
7277
public override
LookupResultKind
ResultKind { get; }
7284
public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt,
LookupResultKind
resultKind, bool isByValue, bool isDeclaration, TypeSymbol type)
7338
public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind,
LookupResultKind
resultKind, TypeSymbol type, bool hasErrors = false)
7357
public override
LookupResultKind
ResultKind { get; }
7362
public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind,
LookupResultKind
resultKind, TypeSymbol type)
7376
public BoundEventAccess(SyntaxNode syntax, BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField,
LookupResultKind
resultKind, TypeSymbol type, bool hasErrors = false)
7393
public override
LookupResultKind
ResultKind { get; }
7398
public BoundEventAccess Update(BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField,
LookupResultKind
resultKind, TypeSymbol type)
Lowering\ClosureConversion\ClosureConversion.cs (1)
1731
return new BoundBadExpression(F.Syntax,
LookupResultKind
.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (4)
351
return new BoundBadExpression(node.Syntax, default(
LookupResultKind
), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), ExpressionType);
1091
return new BoundBadExpression(node.Syntax, default(
LookupResultKind
), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
1098
return new BoundBadExpression(node.Syntax, default(
LookupResultKind
), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
1130
return new BoundBadExpression(node.Syntax, default(
LookupResultKind
), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\LocalRewriter\LocalRewriter.cs (2)
318
var result = new BoundFieldAccess(node.Syntax, new BoundThisReference(node.Syntax, primaryCtor.ContainingType), field, ConstantValue.NotAvailable,
LookupResultKind
.Viable, node.Type);
593
return new BoundBadExpression(syntax,
LookupResultKind
.NotReferencable, ImmutableArray<Symbol?>.Empty, children, resultType);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
145
BoundExpression access = _localRewriter.MakeFieldAccess(f.Syntax, input, field, null,
LookupResultKind
.Viable, field.Type);
155
return _factory.AssignmentExpression(output, _localRewriter.MakePropertyAccess(_factory.Syntax, input, property,
LookupResultKind
.Viable, property.Type, isLeftOfAssignment: false));
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (8)
534
new BoundBinaryOperator(syntax, operatorKind, constantValueOpt: null, methodOpt: null, constrainedToTypeOpt: null,
LookupResultKind
.Viable, loweredLeft, loweredRight, type);
747
return new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, converted, ConstantValue.NotAvailable, MethodSymbol.None, constrainedToTypeOpt: null,
LookupResultKind
.Viable, boolean)
1990
new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, call, ConstantValue.NotAvailable, null, constrainedToTypeOpt: null,
LookupResultKind
.Viable, returnType);
2020
return new BoundBinaryOperator(syntax, operatorKind, constantValueOpt: null, methodOpt: null, constrainedToTypeOpt: null,
LookupResultKind
.Empty, loweredLeft, loweredRight, type);
2030
? new BoundBinaryOperator(syntax, operatorKind, null, method, constrainedToTypeOpt: null, default(
LookupResultKind
), loweredLeft, loweredRight, method.ReturnType)
2160
LookupResultKind
.Viable,
2173
LookupResultKind
.Viable,
2285
LookupResultKind
.Viable,
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
444
LookupResultKind
resultKind,
531
resultKind:
LookupResultKind
.Viable,
1448
resultKind:
LookupResultKind
.Viable,
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
506
resultKind:
LookupResultKind
.Viable,
Lowering\LocalRewriter\LocalRewriter_Event.cs (6)
128
clearCall = new BoundBadExpression(syntax,
LookupResultKind
.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(removeDelegate), ErrorTypeSymbol.UnknownResultType);
170
marshalCall = new BoundBadExpression(syntax,
LookupResultKind
.NotInvocable, ImmutableArray<Symbol?>.Empty, marshalArguments, ErrorTypeSymbol.UnknownResultType);
224
LookupResultKind
resultKind,
265
getOrCreateCall = new BoundBadExpression(syntax,
LookupResultKind
.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(fieldAccess), ErrorTypeSymbol.UnknownResultType);
287
return new BoundBadExpression(syntax,
LookupResultKind
.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(getOrCreateCall), ErrorTypeSymbol.UnknownResultType);
333
return new BoundBadExpression(node.Syntax,
LookupResultKind
.NotCreatable, ImmutableArray.Create<Symbol?>(node.Event),
Lowering\LocalRewriter\LocalRewriter_Field.cs (1)
22
LookupResultKind
resultKind,
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (2)
483
helperCall = new BoundBadExpression(fixedInitializer.Syntax,
LookupResultKind
.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType);
544
lengthCall = new BoundBadExpression(fixedInitializer.Syntax,
LookupResultKind
.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(factory.Local(pinnedTemp)), ErrorTypeSymbol.UnknownResultType);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (5)
458
resultKind:
LookupResultKind
.Viable,
674
resultKind:
LookupResultKind
.Viable,
970
resultKind:
LookupResultKind
.Viable,
1174
resultKind:
LookupResultKind
.Viable,
1270
resultKind:
LookupResultKind
.Viable,
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (2)
117
exitCallExpr = new BoundBadExpression(lockSyntax,
LookupResultKind
.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(boundLockTemp), ErrorTypeSymbol.UnknownResultType);
212
enterCallExpr = new BoundBadExpression(lockSyntax,
LookupResultKind
.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(boundLockTemp), ErrorTypeSymbol.UnknownResultType);
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (4)
358
resultKind:
LookupResultKind
.Viable,
389
newGuid = new BoundBadExpression(node.Syntax,
LookupResultKind
.NotCreatable, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType);
407
callGetTypeFromCLSID = new BoundBadExpression(node.Syntax,
LookupResultKind
.OverloadResolutionFailure, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType);
419
rewrittenObjectCreation = new BoundBadExpression(node.Syntax,
LookupResultKind
.OverloadResolutionFailure, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, node.Type);
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (3)
30
LookupResultKind
resultKind,
86
oldNodeOpt.Update(rewrittenReceiver, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, property, autoPropertyAccessorKind: AccessorKind.Unknown,
LookupResultKind
.Viable, property.Type) :
87
new BoundPropertyAccess(syntax, rewrittenReceiver, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, property, autoPropertyAccessorKind: AccessorKind.Unknown,
LookupResultKind
.Viable, property.Type);
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (1)
69
resultKind:
LookupResultKind
.NotInvocable,
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
602
return new BoundBinaryOperator(syntax, operatorKind, constantValueOpt: null, method, constrainedToTypeOpt: null, default(
LookupResultKind
), loweredLeft, loweredRight, type);
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
228
: new BoundBadExpression(syntax,
LookupResultKind
.Empty, symbols: ImmutableArray<Symbol?>.Empty, childBoundNodes: ImmutableArray<BoundExpression>.Empty, type);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (2)
158
LookupResultKind
.Viable,
175
new BoundUnaryOperator(syntax, kind, loweredOperand, null, methodOpt: method, constrainedToTypeOpt: constrainedToTypeOpt,
LookupResultKind
.Viable, type);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (2)
463
disposeCall = new BoundBadExpression(resourceSyntax,
LookupResultKind
.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(disposedExpression), ErrorTypeSymbol.UnknownResultType);
534
return MakeCall(null, syntax, expression, method, rewrittenArguments, argumentRefKindsOpt,
LookupResultKind
.Viable, temps.ToImmutableAndFree());
Lowering\LocalRewriter\LoweredDynamicOperation.cs (1)
55
var bad = new BoundBadExpression(children[0].Syntax,
LookupResultKind
.Empty, ImmutableArray<Symbol?>.Empty, children, resultType);
Lowering\SyntheticBoundNodeFactory.cs (8)
233
return new BoundBadExpression(Syntax,
LookupResultKind
.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, type, hasErrors: true);
243
return new BoundFieldAccess(Syntax, receiver, f, ConstantValue.NotAvailable,
LookupResultKind
.Viable, f.Type) { WasCompilerGenerated = true };
631
return new BoundBinaryOperator(this.Syntax, kind, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null,
LookupResultKind
.Viable, left, right, type) { WasCompilerGenerated = true };
789
return new BoundBadExpression(Syntax, default(
LookupResultKind
), ImmutableArray<Symbol?>.Empty, args.AsImmutable(), receiver);
854
invokedAsExtensionMethod: false, argsToParamsOpt: default(ImmutableArray<int>), defaultArguments: default(BitVector), resultKind:
LookupResultKind
.Viable,
890
argsToParamsOpt: ImmutableArray<int>.Empty, defaultArguments: default(BitVector), resultKind:
LookupResultKind
.Viable, type: method.ReturnType)
1623
return new BoundUnaryOperator(expression.Syntax, UnaryOperatorKind.BoolLogicalNegation, expression, null, null, constrainedToTypeOpt: null,
LookupResultKind
.Viable, expression.Type);
1870
new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, call, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null,
LookupResultKind
.Viable, returnType);
Operations\CSharpOperationFactory.cs (4)
478
if (boundFunctionPointerInvocation.ResultKind !=
LookupResultKind
.Viable)
631
if (!boundIndexerAccess.OriginalIndexersOpt.IsDefault || boundIndexerAccess.ResultKind ==
LookupResultKind
.OverloadResolutionFailure)
711
if (boundObjectCreationExpression.ResultKind ==
LookupResultKind
.OverloadResolutionFailure || constructor.OriginalDefinition is ErrorMethodSymbol)
887
if (accessor == null || boundObjectInitializerMember.ResultKind ==
LookupResultKind
.OverloadResolutionFailure || accessor.OriginalDefinition is ErrorMethodSymbol)
Operations\CSharpOperationFactory_Methods.cs (2)
121
private bool IsMethodInvalid(
LookupResultKind
resultKind, MethodSymbol targetMethod) =>
122
resultKind ==
LookupResultKind
.OverloadResolutionFailure || targetMethod?.OriginalDefinition is ErrorMethodSymbol;
Symbols\ErrorTypeSymbol.cs (4)
34
internal virtual
LookupResultKind
ResultKind { get { return
LookupResultKind
.Empty; } }
72
Debug.Assert(ResultKind !=
LookupResultKind
.Viable, "Shouldn't have viable result kind on error symbol");
636
internal override
LookupResultKind
ResultKind
Symbols\ExtendedErrorTypeSymbol.cs (8)
26
private readonly
LookupResultKind
_resultKind; // why the guessSymbols were wrong.
49
_resultKind =
LookupResultKind
.Empty;
52
private ExtendedErrorTypeSymbol(NamespaceOrTypeSymbol? containingSymbol, string name, int arity, DiagnosticInfo? errorInfo, bool unreported, bool variableUsedBeforeDeclaration, ImmutableArray<Symbol> candidateSymbols,
LookupResultKind
resultKind)
64
internal ExtendedErrorTypeSymbol(NamespaceOrTypeSymbol guessSymbol,
LookupResultKind
resultKind, DiagnosticInfo errorInfo, bool unreported = false)
69
internal ExtendedErrorTypeSymbol(NamespaceOrTypeSymbol? containingSymbol, Symbol guessSymbol,
LookupResultKind
resultKind, DiagnosticInfo errorInfo, bool unreported = false)
74
internal ExtendedErrorTypeSymbol(NamespaceOrTypeSymbol? containingSymbol, ImmutableArray<Symbol> candidateSymbols,
LookupResultKind
resultKind, DiagnosticInfo errorInfo, int arity, bool unreported = false)
79
Debug.Assert(candidateSymbols.IsEmpty || resultKind !=
LookupResultKind
.Viable, "Shouldn't use LookupResultKind.Viable with candidate symbols");
107
internal override
LookupResultKind
ResultKind
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1819
return new ExtendedErrorTypeSymbol(declaredBase,
LookupResultKind
.NotReferencable, info, true);
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
270
return new ExtendedErrorTypeSymbol(declaredBase,
LookupResultKind
.NotReferencable, info, true);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (4)
342
baseType = new ExtendedErrorTypeSymbol(baseType,
LookupResultKind
.Ambiguous, info);
532
localBase = new ExtendedErrorTypeSymbol(localBase,
LookupResultKind
.NotReferencable, info);
678
result.Add(new ExtendedErrorTypeSymbol(t,
LookupResultKind
.NotReferencable,
756
return new ExtendedErrorTypeSymbol(declaredBase,
LookupResultKind
.NotReferencable,
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (2)
306
resultKind:
LookupResultKind
.Viable,
369
resultKind:
LookupResultKind
.Viable,