600 references to LookupResultKind
Microsoft.CodeAnalysis.CSharp (600)
Binder\Binder_Attributes.cs (11)
169LookupResultKind resultKind = LookupResultKind.Viable; 229LookupResultKind.Inaccessible : 230LookupResultKind.OverloadResolutionFailure); 281hasErrors: resultKind != LookupResultKind.Viable); 523var badLHS = BadExpression(nameSyntax, lookupResultKind: LookupResultKind.Empty); 529LookupResultKind resultKind; 555Debug.Assert(resultKind == LookupResultKind.Viable || wasError); 600private Symbol BindNamedAttributeArgumentName(AttributeArgumentSyntax namedArgument, NamedTypeSymbol attributeType, BindingDiagnosticBag diagnostics, out bool wasError, out LookupResultKind resultKind) 669LookupResultKind.NotAVariable, 682LookupResultKind.NotAVariable,
Binder\Binder_Await.cs (2)
394resultKind: LookupResultKind.Viable, 535resultKind: LookupResultKind.Viable,
Binder\Binder_Conversions.cs (3)
1401resultKind: LookupResultKind.Viable).MakeCompilerGenerated(); 1988if (resolution.ResultKind != LookupResultKind.Viable) 2323? new BoundBadExpression(node.WithElement!.Syntax, LookupResultKind.Empty, symbols: [], naturalWithArguments, CreateErrorType())
Binder\Binder_Crefs.cs (1)
348if (result.Kind == LookupResultKind.Viable)
Binder\Binder_Deconstruct.cs (1)
958resultKind: LookupResultKind.Viable,
Binder\Binder_Expressions.cs (85)
120return BadExpression(syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty); 128return BadExpression(syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, childNode); 136return BadExpression(syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, childNodes); 142protected BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind lookupResultKind) 150protected BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind lookupResultKind, BoundExpression childNode) 158private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols) 171private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols, BoundExpression childNode) 196private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols, ImmutableArray<BoundExpression> childNodes, bool wasCompilerGenerated = false) 218private BoundExpression ToBadExpression(BoundExpression expr, LookupResultKind resultKind = LookupResultKind.Empty) 221Debug.Assert(resultKind != LookupResultKind.Viable); 615return BadExpression(node, LookupResultKind.NotAValue); 622return BadExpression(node, LookupResultKind.NotAValue); 896node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(BindToTypeForErrorRecovery(BindValue(node.Expression, BindingDiagnosticBag.Discarded, BindValueKind.RefersToLocation))), 1083argumentSyntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, 1532bool result = lookupResult.Kind != LookupResultKind.Empty; 1590if (type is ErrorTypeSymbol { ResultKind: LookupResultKind.Empty }) 1699if (lookupResult.Kind != LookupResultKind.Empty) 1743resultKind: LookupResultKind.WrongArity, 2058private BoundExpression BindNonMethod(SimpleNameSyntax node, Symbol symbol, BindingDiagnosticBag diagnostics, LookupResultKind resultKind, bool indexed, bool isError) 2519return BadExpression(node, LookupResultKind.NotLabel); 2878if (conversion.ResultKind == LookupResultKind.OverloadResolutionFailure) 3362LookupResultKind.Viable, 4327LookupResultKind.Empty, 4596LookupResultKind.NotCreatable, //in this context, anyway 4635LookupResultKind.Empty, 4979resultKind: LookupResultKind.Empty, 4990resultKind: LookupResultKind.Empty, 5033resultKind: LookupResultKind.Empty, 5191resultKind: LookupResultKind.Viable, 5203resultKind: LookupResultKind.OverloadResolutionFailure, 5328type = new ExtendedErrorTypeSymbol(type, LookupResultKind.NotCreatable, 5338type = new ExtendedErrorTypeSymbol(type, LookupResultKind.NotCreatable, 5356return new BoundBadExpression(syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, CreateErrorType()); 5483arg.Syntax, LookupResultKind.Empty, symbols: [], 5648return new BoundBadExpression(node, LookupResultKind.NotInvocable, StaticCast<Symbol>.From(type.InstanceConstructors), ImmutableArray.Create(argument), type); 5659sourceDelegate.DelegateInvokeMethod, null, BoundMethodGroupFlags.None, functionType: null, argument, LookupResultKind.Viable); 5695return new BoundBadExpression(node, LookupResultKind.OverloadResolutionFailure, StaticCast<Symbol>.From(type.InstanceConstructors), childNodes, type); 5792return new BoundBadExpression(node, LookupResultKind.NotCreatable, ImmutableArray.Create<Symbol?>(type), children.ToImmutableAndFree(), type) { WasCompilerGenerated = wasCompilerGenerated }; 5938LookupResultKind.Empty, 5958return BindToTypeForErrorRecovery(ToBadExpression(boundExpression, LookupResultKind.NotAValue)); 5996LookupResultKind resultKind; 6099resultKind = LookupResultKind.NotAValue; 6184resultKind = isRhsNestedInitializer ? LookupResultKind.NotAValue : LookupResultKind.NotAVariable; 6209ref LookupResultKind resultKind) 6221resultKind = LookupResultKind.NotAValue; 6251case LookupResultKind.Empty: 6255case LookupResultKind.Inaccessible: 6266return ToBadExpression(boundMember, (valueKind == BindValueKind.RValue) ? LookupResultKind.NotAValue : LookupResultKind.NotAVariable); 6563return BadExpression(elementInitializer, LookupResultKind.NotInvocable); 6604return BadExpression(elementInitializer, LookupResultKind.NotInvocable, ImmutableArray<Symbol>.Empty, boundElementInitializerExpressions); 7045LookupResultKind resultKind; 7050resultKind = LookupResultKind.NotCreatable; 7054resultKind = LookupResultKind.Inaccessible; 7058resultKind = LookupResultKind.OverloadResolutionFailure; 7243return new BoundBadExpression(node, LookupResultKind.OverloadResolutionFailure, ImmutableArray<Symbol>.Empty, children, interfaceType); 8082return new BoundBadExpression(node, LookupResultKind.Ambiguous, lookupResult.Symbols.AsImmutable(), ImmutableArray.Create(AdjustBadExpressionChild(boundLeft)), CreateErrorType(rightName), hasErrors: true); 8104else if (lookupResult.Kind == LookupResultKind.WrongArity) 8114else if (lookupResult.Kind == LookupResultKind.Empty) 8157return BadExpression(node, LookupResultKind.NotAValue, boundLeft); 8301return BindPropertyAccess(syntax, receiver, propertySymbol, diagnostics, LookupResultKind.Viable, hasErrors: false); 8305return new BoundBadExpression(syntax, LookupResultKind.Viable, errorTypeSymbol.CandidateSymbols!, [AdjustBadExpressionChild(receiver)], CreateErrorType()); 8536LookupResultKind lookupKind) 8952result = new MethodGroupResolution(bestProperty, LookupResultKind.Viable, diagnostics.ToReadOnly()); 9028ExtendedErrorTypeSymbol resultSymbol = new ExtendedErrorTypeSymbol(containingSymbol: null, symbols, LookupResultKind.OverloadResolutionFailure, errorInfo, arity); 9029Debug.Assert(lookupResult.Kind == LookupResultKind.Viable); 9040LookupResultKind resultKind, 9443binder.CheckViability(property, arity, lookupOptions, accessThroughType: null, diagnose: false, useSiteInfo: ref useSiteInfo).Kind == LookupResultKind.Viable) 9728binder.CheckViability(property, arity, lookupOptions, accessThroughType: null, diagnose: false, useSiteInfo: ref useSiteInfo).Kind == LookupResultKind.Viable) 9744binder.CheckViability(method, arity, lookupOptions, accessThroughType: null, diagnose: false, useSiteInfo: ref useSiteInfo).Kind == LookupResultKind.Viable) 9806LookupResultKind resultKind, 9985LookupResultKind lookupResult, 10071LookupResultKind lookupResult, 10121ref LookupResultKind resultKind, 10146resultKind = LookupResultKind.StaticInstanceMismatch; 10155resultKind = LookupResultKind.StaticInstanceMismatch; 10180Debug.Assert(result.Kind != LookupResultKind.Empty); 10601return new BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, childBoundNodes, CreateErrorType(), hasErrors: true); 11419lookupSymbolOpt: methods.Count == 1 ? methods[0] : null, lookupError: null, BoundMethodGroupFlags.None, functionType: null, receiver, LookupResultKind.Viable) 11427resultKind: LookupResultKind.Viable, analyzedArguments: analyzedArguments, actualMethodArguments: ref actualExtensionArguments, useSiteInfo: ref useSiteInfo, options: OverloadResolution.Options.IgnoreNormalFormIfHasValidParamsParameter, 11701LookupResultKind methodResultKind = methodResolution.ResultKind; 11702LookupResultKind extensionMethodResultKind = extensionMethodResolution.ResultKind; 12017if (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)
122return BadExpression(node, LookupResultKind.Empty, ImmutableArray.Create(symbol), args.Add(receiver), wasCompilerGenerated: true); 151result = CreateBadCall(node, boundExpression, LookupResultKind.NotInvocable, analyzedArguments); 373return CreateBadCall(node, boundExpression, LookupResultKind.NotInvocable, analyzedArguments); 390result = CreateBadCall(node, boundExpression, LookupResultKind.NotInvocable, analyzedArguments); 768anyApplicableCandidates = resolution.ResultKind == LookupResultKind.Viable && resolution.OverloadResolutionResult.HasAnyApplicableMember; 775LookupResultKind resultKind; 824if (resolution.ResultKind != LookupResultKind.Viable) 1392argsToParamsOpt: argsToParams, defaultArguments, resultKind: LookupResultKind.Viable, type: returnType, hasErrors: gotError); 2069LookupResultKind resultKind, 2349LookupResultKind resultKind, 2601LookupResultKind.OverloadResolutionFailure, 2624LookupResultKind.Viable,
Binder\Binder_Lookup.cs (9)
75if (result.Kind != LookupResultKind.Viable && result.Kind != LookupResultKind.Empty) 228if (resultOfThisMember.Kind == LookupResultKind.Empty) 257if (resultOfThisMember.Kind == LookupResultKind.Empty) 328if (errorType.ResultKind == LookupResultKind.Inaccessible) 518if (res.Kind == LookupResultKind.Viable) 534if (res.Kind == LookupResultKind.Viable) 755if (result == null || result.Kind != LookupResultKind.Viable || (object)symbol == null) 1054result.MergeEqual(new SingleLookupResult(LookupResultKind.Viable, sym, null));
Binder\Binder_Operators.cs (121)
62leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, LookupResultKind.Empty, CreateErrorType(), hasErrors: true); 95LookupResultKind.Viable, 107leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, LookupResultKind.Empty, CreateErrorType(), hasErrors: true); 121leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, LookupResultKind.NotAVariable, CreateErrorType(), hasErrors: true); 126return createBadCompoundAssignmentOperator(node, kind, left, right, LookupResultKind.OverloadResolutionFailure, originalUserDefinedOperators: default, ref operatorResolutionForReporting, diagnostics); 155LookupResultKind resultKind; 162Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty); 163Debug.Assert(best.HasValue == (resultKind is LookupResultKind.Viable)); 164Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty) || originalUserDefinedOperators.IsEmpty); 166if (!best.HasValue && resultKind != LookupResultKind.Ambiguous) 168Debug.Assert(resultKind is LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty); 171LookupResultKind staticExtensionResultKind; 184Debug.Assert(instanceExtensionResult.ResultKind is LookupResultKind.Viable || !instanceExtensionResult.OriginalUserDefinedOperatorsOpt.IsDefaultOrEmpty); 326LookupResultKind resultKind, 522resultKind: LookupResultKind.Viable, 543resultKind: LookupResultKind.OverloadResolutionFailure, 583out LookupResultKind staticResultKind, 587staticResultKind = LookupResultKind.Empty; 851resultKind: LookupResultKind.Viable, 949return new BoundBinaryOperator(node, kind, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Empty, left, right, GetBinaryOperatorErrorType(kind, diagnostics, node), true); 990return new BoundBinaryOperator(node, BinaryOperatorKind.StringConcatenation, BoundBinaryOperator.UncommonData.UnconvertedInterpolatedStringAddition(stringConstant), LookupResultKind.Empty, left, right, right.Type); 1008LookupResultKind resultKind; 1135ref OperatorResolutionForReporting operatorResolutionForReporting, out LookupResultKind resultKind, 1140resultKind = LookupResultKind.OverloadResolutionFailure; 1159ref LookupResultKind resultKind, 1220LookupResultKind extensionResultKind; 1284private void ReportUnaryOperatorError(CSharpSyntaxNode node, BindingDiagnosticBag diagnostics, string operatorName, BoundExpression operand, LookupResultKind resultKind, ref OperatorResolutionForReporting operatorResolutionForReporting) 1297ErrorCode errorCode = resultKind == LookupResultKind.Ambiguous ? 1305LookupResultKind resultKind, ref OperatorResolutionForReporting operatorResolutionForReporting) 1325LookupResultKind resultKind, ref OperatorResolutionForReporting operatorResolutionForReporting) 1363case LookupResultKind.Ambiguous: 1367case LookupResultKind.OverloadResolutionFailure when operatorToken.Kind() is SyntaxKind.PlusToken && isReadOnlySpanOfByte(left.Type) && isReadOnlySpanOfByte(right.Type): 1448resultKind: LookupResultKind.Viable, left, right, type: left.Type, hasErrors: constantValue != null && constantValue.IsBad); 1458resultKind: LookupResultKind.Empty, left, right, type: GetBinaryOperatorErrorType(kind, diagnostics, node), hasErrors: true); 1468LookupResultKind lookupResult; 1474lookupResult = LookupResultKind.OverloadResolutionFailure; 2036out LookupResultKind resultKind, 2054out LookupResultKind resultKind, 2059Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty); 2060Debug.Assert(possiblyBest.HasValue == (resultKind is LookupResultKind.Viable)); 2061Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty) || originalUserDefinedOperators.IsEmpty); 2063if (!possiblyBest.HasValue && resultKind != LookupResultKind.Ambiguous) 2065Debug.Assert(resultKind is LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty); 2068LookupResultKind extensionResultKind; 2095out LookupResultKind resultKind, 2098resultKind = LookupResultKind.Empty; 2155out LookupResultKind resultKind, 2169Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty); 2170Debug.Assert(possiblyBest.HasValue == (resultKind is LookupResultKind.Viable)); 2171Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty) || originalUserDefinedOperators.IsEmpty); 2176private static BinaryOperatorAnalysisResult BinaryOperatorAnalyzeOverloadResolutionResult(BinaryOperatorOverloadResolutionResult result, out LookupResultKind resultKind, out ImmutableArray<MethodSymbol> originalUserDefinedOperators) 2195resultKind = LookupResultKind.Viable; 2199resultKind = LookupResultKind.Ambiguous; 2203resultKind = LookupResultKind.OverloadResolutionFailure; 2209resultKind = possiblyBest.HasValue ? LookupResultKind.Viable : LookupResultKind.Empty; 2259out LookupResultKind resultKind, 2267Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty); 2268Debug.Assert(best.HasValue == (resultKind is LookupResultKind.Viable)); 2269Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty) || originalUserDefinedOperators.IsEmpty); 2271if (!best.HasValue && resultKind != LookupResultKind.Ambiguous) 2273Debug.Assert(resultKind is LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty); 2276LookupResultKind extensionResultKind; 2301out LookupResultKind resultKind, 2316Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty); 2317Debug.Assert(possiblyBest.HasValue == (resultKind is LookupResultKind.Viable)); 2318Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty) || originalUserDefinedOperators.IsEmpty); 2329out LookupResultKind resultKind, 2349resultKind = LookupResultKind.Viable; 2364resultKind = LookupResultKind.OverloadResolutionFailure; 2368resultKind = LookupResultKind.Ambiguous; 2373resultKind = LookupResultKind.OverloadResolutionFailure; 2379resultKind = possiblyBest.HasValue ? LookupResultKind.Viable : LookupResultKind.Empty; 2407out LookupResultKind resultKind, 2410resultKind = LookupResultKind.Empty; 3291LookupResultKind.Empty, 3312resultKind: LookupResultKind.Viable, 3338LookupResultKind resultKind; 3342Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty); 3343Debug.Assert(best.HasValue == (resultKind is LookupResultKind.Viable)); 3344Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty) || originalUserDefinedOperators.IsEmpty); 3346if (!best.HasValue && resultKind != LookupResultKind.Ambiguous) 3348Debug.Assert(resultKind is LookupResultKind.OverloadResolutionFailure or LookupResultKind.Empty); 3352LookupResultKind staticExtensionResultKind; 3365Debug.Assert(instanceExtensionResult.ResultKind is LookupResultKind.Viable || !instanceExtensionResult.OriginalUserDefinedOperatorsOpt.IsDefaultOrEmpty); 3626LookupResultKind.Viable, 3651LookupResultKind.OverloadResolutionFailure, 3690out LookupResultKind staticResultKind, 3696staticResultKind = LookupResultKind.Empty; 4365resultKind: LookupResultKind.Empty, 4386resultKind: LookupResultKind.Viable, 4390LookupResultKind resultKind;
Binder\Binder_Patterns.cs (3)
925lengthAccess = new BoundBadExpression(node, LookupResultKind.Empty, symbols: [], childBoundNodes: [], CreateErrorType(), hasErrors: true) { WasCompilerGenerated = true }; 2367case LookupResultKind.Empty: 2371case LookupResultKind.Inaccessible:
Binder\Binder_Query.cs (6)
302state.selectOrGroup, LookupResultKind.OverloadResolutionFailure, ImmutableArray<Symbol?>.Empty, 741yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), CreateErrorType()); 747yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), yExpression.Type); 808field2Value = new BoundBadExpression(field2Value.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(field2Value), field2Value.Type, true); 964receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType()); 986receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType());
Binder\Binder_Statements.cs (8)
2313else if (conversion.ResultKind == LookupResultKind.OverloadResolutionFailure) 2709LookupResultKind.Viable, 2755var best = this.UnaryOperatorOverloadResolution(UnaryOperatorKind.True, expr, node, diagnostics, ref discardedOperatorResolutionForReporting, out LookupResultKind resultKind, out ImmutableArray<MethodSymbol> originalUserDefinedOperators); 4028LookupResultKind resultKind = LookupResultKind.Viable; 4058resultKind = LookupResultKind.Inaccessible; 4128resultKind: LookupResultKind.Viable, 4266if (call.ResultKind == LookupResultKind.Empty)
Binder\Binder_Symbols.cs (11)
224case LookupResultKind.Empty: 230case LookupResultKind.Viable: 345return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(GetContainingNamespaceOrNonExtensionType(symbol.Symbol), symbol.Symbol, LookupResultKind.NotATypeOrNamespace, diagnosticInfo)); 596return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(left, LookupResultKind.NotATypeOrNamespace, diagnostics.Add(ErrorCode.ERR_ColColWithTypeAlias, node.Alias.Location, node.Alias.Identifier.Text))); 1522receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.Ambiguous, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(receiver), receiver.Type, hasErrors: true).MakeCompilerGenerated(); 1532receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, childBoundNodes: [AdjustBadExpressionChild(receiver)], receiver.Type, hasErrors: true).MakeCompilerGenerated(); 2324LookupResultKind.Ambiguous, 2340singleResult = new ExtendedErrorTypeSymbol(GetContainingNamespaceOrNonExtensionType(singleResult), singleResult, LookupResultKind.NotReferencable, errorInfo); // UNDONE: Review resultkind. 2386if (result.Kind == LookupResultKind.Empty) 2424result.Kind == LookupResultKind.NotATypeOrNamespace || result.Kind == LookupResultKind.NotAnAttributeType)
Binder\Binder_TupleOperators.cs (2)
159LookupResultKind resultKind; 216ReportBinaryOperatorError(node, diagnostics, node.OperatorToken, left, right, LookupResultKind.Ambiguous, ref discardedOperatorResolutionForReporting);
Binder\Binder_XmlNameAttribute.cs (1)
33if (lookupResult.Kind == LookupResultKind.Empty)
Binder\Binder.ValueChecks.cs (4)
873Debug.Assert(methodGroup.ResultKind != LookupResultKind.Viable); 904var resultKind = (valueKind == BindValueKind.RValue || valueKind == BindValueKind.RValueOrMethodGroup) ? 905LookupResultKind.NotAValue : 906LookupResultKind.NotAVariable;
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
87LookupResultKind.Empty,
Binder\ForEachLoopBinder.cs (2)
747LookupResultKind.Empty, 960if (collectionExpr.ResultKind == LookupResultKind.NotAValue)
Binder\LookupResult.cs (21)
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) 294if (Kind == LookupResultKind.WrongArity && result.Kind == LookupResultKind.WrongArity)
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 (6)
26public readonly LookupResultKind ResultKind; 33public MethodGroupResolution(Symbol otherSymbol, LookupResultKind resultKind, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics) 43LookupResultKind resultKind, 51Debug.Assert(resultKind != LookupResultKind.Ambiguous); // HasAnyApplicableMethod is expecting Viable methods. 78(this.ResultKind == LookupResultKind.Viable) && 94bool isExtensionMember = ResultKind == LookupResultKind.Viable && MethodGroup is null;
Binder\Semantics\Conversions\Conversion.cs (6)
1096internal LookupResultKind ResultKind 1105return LookupResultKind.Viable; 1109return LookupResultKind.OverloadResolutionFailure; 1113return this.Kind == ConversionKind.NoConversion ? LookupResultKind.Empty : LookupResultKind.Viable; 1120return LookupResultKind.OverloadResolutionFailure;
Binder\Semantics\Conversions\Conversions.cs (1)
386resolution.ResultKind == LookupResultKind.Viable)
Binder\Semantics\OverloadResolution\MethodGroup.cs (10)
22internal LookupResultKind ResultKind { get; private set; } 33LookupResultKind resultKind = LookupResultKind.Viable, 44LookupResultKind resultKind = LookupResultKind.Viable, 70LookupResultKind resultKind = LookupResultKind.Viable, 81private void PopulateHelper(BoundExpression receiverOpt, LookupResultKind resultKind, DiagnosticInfo error) 96this.ResultKind = LookupResultKind.Empty; 135Debug.Assert(this.ResultKind == LookupResultKind.Empty);
Binder\SingleLookupResult.cs (3)
21internal readonly LookupResultKind Kind; 29internal SingleLookupResult(LookupResultKind kind, Symbol? symbol, DiagnosticInfo? error) 31Debug.Assert(symbol is not null || kind == LookupResultKind.Empty);
Binder\SwitchBinder.cs (1)
469return new BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(switchGoverningExpression), switchGoverningType ?? CreateErrorType());
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
138if (res.Kind == LookupResultKind.Viable)
BoundTree\BoundCall.cs (4)
11public bool IsErroneousNode => ResultKind is not LookupResultKind.Viable; 15Debug.Assert(ResultKind is not LookupResultKind.MemberGroup); 16Debug.Assert(ResultKind is not LookupResultKind.StaticInstanceMismatch); 17Debug.Assert(ResultKind is LookupResultKind.Viable || HasErrors);
BoundTree\BoundExpression.cs (6)
123public virtual LookupResultKind ResultKind 127return LookupResultKind.Viable; 285public override LookupResultKind ResultKind 293return LookupResultKind.Viable; 355public override LookupResultKind ResultKind 359return !this.OriginalIndexersOpt.IsDefault ? LookupResultKind.OverloadResolutionFailure : base.ResultKind;
BoundTree\Constructors.cs (20)
20: this(syntax, receiver, fieldSymbol, constantValueOpt, LookupResultKind.Viable, fieldSymbol.Type, hasErrors) 29LookupResultKind resultKind, 41LookupResultKind resultKind, 53LookupResultKind resultKind, 99LookupResultKind resultKind, 117LookupResultKind resultKind, 131LookupResultKind resultKind, 136resultKind = resultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 143Debug.Assert(resultKind is not LookupResultKind.Viable); 230resultKind: LookupResultKind.Viable, 420LookupResultKind resultKind, 441LookupResultKind resultKind, 454LookupResultKind resultKind, 540public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol type) 662LookupResultKind resultKind, 676LookupResultKind resultKind, 690LookupResultKind resultKind, 702LookupResultKind resultKind, 719LookupResultKind resultKind, 726public 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 (72)
384LookupResultKind resultKind = LookupResultKind.Ambiguous; 392resultKind = LookupResultKind.OverloadResolutionFailure; 1930boundExpr, boundNodeForSyntacticParent, binderOpt, options, out bool isDynamic, out LookupResultKind resultKind, out ImmutableArray<Symbol> unusedMemberGroup); 1935LookupResultKind highestResultKind; 1941if (highestResultKind != LookupResultKind.Empty && highestResultKind < resultKind) 1948resultKind == LookupResultKind.OverloadResolutionFailure && 1951LookupResultKind highestResultKind; 1965if (resultKind == LookupResultKind.Empty) 1969return SymbolInfoFactory.Create(ImmutableArray<Symbol>.Empty, LookupResultKind.Empty, isDynamic); 1989if (resultKind == LookupResultKind.Viable && symbols.Count > 1) 1991resultKind = LookupResultKind.OverloadResolutionFailure; 2291LookupResultKind resultKind; 2337LookupResultKind resultKind = originalErrorSymbol.ResultKind; 2338if (resultKind != LookupResultKind.Empty) 3358out LookupResultKind resultKind, 3363resultKind = LookupResultKind.Viable; 3384if (resultKind == LookupResultKind.NotCreatable) 3390resultKind = LookupResultKind.Empty; 3412((BoundBadExpression)boundNodeForSyntacticParent).ResultKind == LookupResultKind.NotCreatable) 3414resultKind = LookupResultKind.NotCreatable; 3516resultKind = LookupResultKind.Empty; 3525case BoundKind.EventAccess when boundNodeForSyntacticParent is BoundEventAssignmentOperator { ResultKind: LookupResultKind.Viable } parentOperator && 3613Debug.Assert(resultKind != LookupResultKind.Viable); 3692resultKind = resultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 3750private static ParameterSymbol GetThisParameter(TypeSymbol typeOfThis, NamedTypeSymbol containingType, Symbol containingMember, out LookupResultKind resultKind) 3755resultKind = LookupResultKind.NotReferencable; 3768resultKind = LookupResultKind.NotReferencable; 3774resultKind = LookupResultKind.StaticInstanceMismatch; 3783resultKind = LookupResultKind.NotReferencable; 3790resultKind = LookupResultKind.Viable; 3798resultKind = LookupResultKind.NotReferencable; 3811resultKind = LookupResultKind.NotReferencable; 3818private static void GetSymbolsAndResultKind(BoundUnaryOperator unaryOperator, out bool isDynamic, ref LookupResultKind resultKind, ref OneOrMany<Symbol> symbols) 3823if (operandType == 0 || operandType == UnaryOperatorKind.UserDefined || unaryOperator.ResultKind != LookupResultKind.Viable) 3841private static void GetSymbolsAndResultKind(BoundIncrementOperator increment, out bool isDynamic, ref LookupResultKind resultKind, ref OneOrMany<Symbol> symbols) 3846if (operandType == 0 || operandType == UnaryOperatorKind.UserDefined || increment.ResultKind != LookupResultKind.Viable) 3865private static void GetSymbolsAndResultKind(BoundBinaryOperator binaryOperator, out bool isDynamic, ref LookupResultKind resultKind, ref OneOrMany<Symbol> symbols) 3871if (operandType == 0 || operandType == BinaryOperatorKind.UserDefined || binaryOperator.ResultKind != LookupResultKind.Viable || binaryOperator.OperatorKind.IsLogical()) 3938private static void GetSymbolsAndResultKind(BoundCompoundAssignmentOperator compoundAssignment, out bool isDynamic, ref LookupResultKind resultKind, ref OneOrMany<Symbol> symbols) 3944if (operandType == 0 || operandType == BinaryOperatorKind.UserDefined || compoundAssignment.ResultKind != LookupResultKind.Viable) 3964private static void GetSymbolsAndResultKind(BoundExpression node, Symbol symbolOpt, ImmutableArray<MethodSymbol> originalCandidates, out OneOrMany<Symbol> symbols, out LookupResultKind resultKind) 3979resultKind = LookupResultKind.Empty; 3990ref LookupResultKind resultKind, 4012Debug.Assert(resultKind != LookupResultKind.Viable || 4043ref LookupResultKind resultKind, 4073Debug.Assert(resultKind != LookupResultKind.Viable); 4090Debug.Assert(resultKind != LookupResultKind.Viable); 4091resultKind = resultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 4261out LookupResultKind resultKind, 4270if (resultKind == LookupResultKind.Empty) 4272resultKind = LookupResultKind.Viable; 4297resultKind = LookupResultKind.Viable; 4301resultKind = call.ResultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 4368resultKind = resultKind.WorseResultKind(LookupResultKind.MemberGroup); 4375resultKind = resultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 4390resultKind = resultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 4400if (!isDynamic && resultKind > LookupResultKind.OverloadResolutionFailure) 4402resultKind = LookupResultKind.OverloadResolutionFailure; 4414out LookupResultKind resultKind, 4422if (resultKind == LookupResultKind.Empty) 4424resultKind = LookupResultKind.Viable; 4446resultKind = LookupResultKind.Viable; 4450resultKind = indexer.ResultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 4485if (resultKind > LookupResultKind.OverloadResolutionFailure) 4487resultKind = LookupResultKind.OverloadResolutionFailure; 4590var resultKind = LookupResultKind.Empty; 4726ref LookupResultKind resultKind, 4736LookupResultKind singleKind = singleResult.Kind; 4745resultKind = LookupResultKind.Empty; 4757Debug.Assert((members.Count == 0) == (resultKind == LookupResultKind.Empty));
Compilation\SymbolInfoFactory.cs (3)
20internal static SymbolInfo Create(ImmutableArray<Symbol> symbols, LookupResultKind resultKind, bool isDynamic) 23internal static SymbolInfo Create(OneOrMany<Symbol> symbols, LookupResultKind resultKind, bool isDynamic) 36else 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, 506resultKind: LookupResultKind.Viable,
Generated\BoundNodes.xml.Generated.cs (48)
986public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type, bool hasErrors = false) 1002public override LookupResultKind ResultKind { get; } 1009public BoundBadExpression Update(LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type) 1204public BoundUnaryOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1226public override LookupResultKind ResultKind { get; } 1232public BoundUnaryOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1246public 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) 1274public override LookupResultKind ResultKind { get; } 1280public 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) 1467public BoundFunctionPointerInvocation(SyntaxNode syntax, BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 1485public override LookupResultKind ResultKind { get; } 1490public BoundFunctionPointerInvocation Update(BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type) 1682public BoundBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1701public override LookupResultKind ResultKind { get; } 1706public BoundBinaryOperator Update(BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type) 1758public BoundUserDefinedConditionalLogicalOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, BoundValuePlaceholder? trueFalseOperandPlaceholder, BoundExpression? trueFalseOperandConversion, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1791public override LookupResultKind ResultKind { get; } 1797public BoundUserDefinedConditionalLogicalOperator Update(BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, BoundValuePlaceholder? trueFalseOperandPlaceholder, BoundExpression? trueFalseOperandConversion, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type) 1811public 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) 1838public override LookupResultKind ResultKind { get; } 1844public BoundCompoundAssignmentOperator Update(BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 5793protected BoundMethodOrPropertyGroup(BoundKind kind, SyntaxNode syntax, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 5802public override LookupResultKind ResultKind { get; } 6144public 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) 6171public BoundMethodGroup Update(ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, ImmutableArray<MethodSymbol> methods, Symbol? lookupSymbolOpt, DiagnosticInfo? lookupError, BoundMethodGroupFlags? flags, FunctionTypeSymbol? functionType, BoundExpression? receiverOpt, LookupResultKind resultKind) 6185public BoundPropertyGroup(SyntaxNode syntax, ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 6199public BoundPropertyGroup Update(ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind) 6213public 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) 6252public override LookupResultKind ResultKind { get; } 6258public 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) 6311public 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) 6337public override LookupResultKind ResultKind { get; } 6342public BoundAttribute Update(MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments, LookupResultKind resultKind, TypeSymbol type) 6859public 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) 6887public override LookupResultKind ResultKind { get; } 6894public 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) 6981public 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) 7007public override LookupResultKind ResultKind { get; } 7012public BoundCollectionElementInitializer Update(MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod, LookupResultKind resultKind, TypeSymbol type) 7373public BoundFieldAccess(SyntaxNode syntax, BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type, bool hasErrors = false) 7392public override LookupResultKind ResultKind { get; } 7399public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type) 7453public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7472public override LookupResultKind ResultKind { get; } 7477public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type) 7491public BoundEventAccess(SyntaxNode syntax, BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7508public override LookupResultKind ResultKind { get; } 7513public BoundEventAccess Update(BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type)
Lowering\ClosureConversion\ClosureConversion.cs (1)
1745return new BoundBadExpression(F.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (4)
358return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), ExpressionType); 1143return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type); 1150return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type); 1182return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (8)
542new BoundBinaryOperator(syntax, operatorKind, constantValueOpt: null, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Viable, loweredLeft, loweredRight, type); 757return new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, converted, ConstantValue.NotAvailable, MethodSymbol.None, constrainedToTypeOpt: null, LookupResultKind.Viable, boolean) 2009new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, call, ConstantValue.NotAvailable, null, constrainedToTypeOpt: null, LookupResultKind.Viable, returnType); 2039return new BoundBinaryOperator(syntax, operatorKind, constantValueOpt: null, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Empty, loweredLeft, loweredRight, type); 2049? new BoundBinaryOperator(syntax, operatorKind, null, method, constrainedToTypeOpt: null, default(LookupResultKind), loweredLeft, loweredRight, method.ReturnType) 2179LookupResultKind.Viable, 2192LookupResultKind.Viable, 2304LookupResultKind.Viable,
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
462LookupResultKind resultKind, 549resultKind: LookupResultKind.Viable, 1534resultKind: 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); 345return 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)
484helperCall = new BoundBadExpression(fixedInitializer.Syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType); 545lengthCall = new BoundBadExpression(fixedInitializer.Syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(factory.Local(pinnedTemp)), ErrorTypeSymbol.UnknownResultType);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (5)
468resultKind: LookupResultKind.Viable, 673resultKind: LookupResultKind.Viable, 969resultKind: LookupResultKind.Viable, 1173resultKind: LookupResultKind.Viable, 1269resultKind: 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)
363resultKind: LookupResultKind.Viable, 394newGuid = new BoundBadExpression(node.Syntax, LookupResultKind.NotCreatable, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType); 412callGetTypeFromCLSID = new BoundBadExpression(node.Syntax, LookupResultKind.OverloadResolutionFailure, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType); 428rewrittenObjectCreation = 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)
610currentResult = new BoundBinaryOperator(current.Syntax, current.OperatorKind, constantValueOpt: null, method, constrainedToTypeOpt: null, default(LookupResultKind), currentResult, right, current.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)
159LookupResultKind.Viable, 176new 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\LocalRewriter.cs (2)
323var result = new BoundFieldAccess(node.Syntax, new BoundThisReference(node.Syntax, primaryCtor.ContainingType), field, ConstantValue.NotAvailable, LookupResultKind.Viable, node.Type); 603return 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); 157return _factory.AssignmentExpression(output, _localRewriter.MakePropertyAccess(_factory.Syntax, input, property, LookupResultKind.Viable, property.Type, isLeftOfAssignment: false));
Lowering\LocalRewriter\LoweredDynamicOperation.cs (1)
55var bad = new BoundBadExpression(children[0].Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, children, resultType);
Lowering\SyntheticBoundNodeFactory.cs (8)
246return new BoundBadExpression(Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, type, hasErrors: true); 256return new BoundFieldAccess(Syntax, receiver, f, ConstantValue.NotAvailable, LookupResultKind.Viable, f.Type) { WasCompilerGenerated = true }; 650return new BoundBinaryOperator(this.Syntax, kind, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Viable, left, right, type) { WasCompilerGenerated = true }; 823return new BoundBadExpression(Syntax, default(LookupResultKind), ImmutableArray<Symbol?>.Empty, args.AsImmutable(), receiver); 888invokedAsExtensionMethod: false, argsToParamsOpt: default(ImmutableArray<int>), defaultArguments: default(BitVector), resultKind: LookupResultKind.Viable, 929argsToParamsOpt: ImmutableArray<int>.Empty, defaultArguments: default(BitVector), resultKind: LookupResultKind.Viable, type: method.ReturnType) 1642return new BoundUnaryOperator(expression.Syntax, UnaryOperatorKind.BoolLogicalNegation, expression, null, null, constrainedToTypeOpt: null, LookupResultKind.Viable, expression.Type); 1889new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, call, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Viable, returnType);
Operations\CSharpOperationFactory_Methods.cs (2)
121private bool IsMethodInvalid(LookupResultKind resultKind, MethodSymbol targetMethod) => 122resultKind == LookupResultKind.OverloadResolutionFailure || targetMethod?.OriginalDefinition is ErrorMethodSymbol;
Operations\CSharpOperationFactory.cs (4)
485if (boundFunctionPointerInvocation.ResultKind != LookupResultKind.Viable) 638if (!boundIndexerAccess.OriginalIndexersOpt.IsDefault || boundIndexerAccess.ResultKind == LookupResultKind.OverloadResolutionFailure) 709=> boundObjectCreationExpression is { ResultKind: not LookupResultKind.OverloadResolutionFailure, Constructor.OriginalDefinition: not ErrorMethodSymbol }; 902if (accessor == null || boundObjectInitializerMember.ResultKind == LookupResultKind.OverloadResolutionFailure || accessor.OriginalDefinition is ErrorMethodSymbol)
Symbols\ErrorTypeSymbol.cs (4)
35internal virtual LookupResultKind ResultKind { get { return LookupResultKind.Empty; } } 73Debug.Assert(ResultKind != LookupResultKind.Viable, "Shouldn't have viable result kind on error symbol"); 651internal 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)
2342return new ExtendedErrorTypeSymbol(declaredBase, LookupResultKind.NotReferencable, info, true);
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
313return new ExtendedErrorTypeSymbol(declaredBase, LookupResultKind.NotReferencable, info, true);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (4)
342baseType = new ExtendedErrorTypeSymbol(baseType, LookupResultKind.Ambiguous, info); 587localBase = new ExtendedErrorTypeSymbol(localBase, LookupResultKind.NotReferencable, info); 739result.Add(new ExtendedErrorTypeSymbol(t, LookupResultKind.NotReferencable, 827return new ExtendedErrorTypeSymbol(declaredBase, LookupResultKind.NotReferencable,
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (3)
310resultKind: LookupResultKind.Viable, 378resultKind: LookupResultKind.Viable, 404resultKind: LookupResultKind.Viable,