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