496 references to LookupResultKind
Microsoft.CodeAnalysis.CSharp (496)
Binder\Binder.ValueChecks.cs (4)
642Debug.Assert(methodGroup.ResultKind != LookupResultKind.Viable); 672var resultKind = (valueKind == BindValueKind.RValue || valueKind == BindValueKind.RValueOrMethodGroup) ? 673LookupResultKind.NotAValue : 674LookupResultKind.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)
956resultKind: LookupResultKind.Viable,
Binder\Binder_Expressions.cs (79)
113return BadExpression(syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty); 121return BadExpression(syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, childNode); 129return BadExpression(syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, childNodes); 135protected BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind lookupResultKind) 143protected BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind lookupResultKind, BoundExpression childNode) 151private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols) 164private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols, BoundExpression childNode) 177private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols, ImmutableArray<BoundExpression> childNodes, bool wasCompilerGenerated = false) 199private BoundExpression ToBadExpression(BoundExpression expr, LookupResultKind resultKind = LookupResultKind.Empty) 202Debug.Assert(resultKind != LookupResultKind.Viable); 583return BadExpression(node, LookupResultKind.NotAValue); 590return BadExpression(node, LookupResultKind.NotAValue); 861node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(BindToTypeForErrorRecovery(BindValue(node.Expression, BindingDiagnosticBag.Discarded, BindValueKind.RefersToLocation))), 1048argumentSyntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, 1491bool result = lookupResult.Kind != LookupResultKind.Empty; 1637if (lookupResult.Kind != LookupResultKind.Empty) 1679resultKind: LookupResultKind.WrongArity, 1807if (lookupResult.Kind != LookupResultKind.Empty) 1987private BoundExpression BindNonMethod(SimpleNameSyntax node, Symbol symbol, BindingDiagnosticBag diagnostics, LookupResultKind resultKind, bool indexed, bool isError) 2440return BadExpression(node, LookupResultKind.NotLabel); 2799if (conversion.ResultKind == LookupResultKind.OverloadResolutionFailure) 3283LookupResultKind.Viable, 4235LookupResultKind.Empty, 4504LookupResultKind.NotCreatable, //in this context, anyway 4543LookupResultKind.Empty, 4875resultKind: LookupResultKind.Empty, 4886resultKind: LookupResultKind.Empty, 4929resultKind: LookupResultKind.Empty, 5085resultKind: LookupResultKind.Viable, 5097resultKind: LookupResultKind.OverloadResolutionFailure, 5225type = new ExtendedErrorTypeSymbol(type, LookupResultKind.NotCreatable, 5233type = new ExtendedErrorTypeSymbol(type, LookupResultKind.NotCreatable, 5251return new BoundBadExpression(syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, CreateErrorType()); 5460return new BoundBadExpression(node, LookupResultKind.NotInvocable, StaticCast<Symbol>.From(type.InstanceConstructors), ImmutableArray.Create(argument), type); 5471sourceDelegate.DelegateInvokeMethod, null, BoundMethodGroupFlags.None, functionType: null, argument, LookupResultKind.Viable); 5507return new BoundBadExpression(node, LookupResultKind.OverloadResolutionFailure, StaticCast<Symbol>.From(type.InstanceConstructors), childNodes, type); 5604return new BoundBadExpression(node, LookupResultKind.NotCreatable, ImmutableArray.Create<Symbol?>(type), children.ToImmutableAndFree(), type) { WasCompilerGenerated = wasCompilerGenerated }; 5772LookupResultKind.Empty, 5792return BindToTypeForErrorRecovery(ToBadExpression(boundExpression, LookupResultKind.NotAValue)); 5830LookupResultKind resultKind; 5933resultKind = LookupResultKind.NotAValue; 6019resultKind = isRhsNestedInitializer ? LookupResultKind.NotAValue : LookupResultKind.NotAVariable; 6044ref LookupResultKind resultKind) 6056resultKind = LookupResultKind.NotAValue; 6086case LookupResultKind.Empty: 6090case LookupResultKind.Inaccessible: 6101return ToBadExpression(boundMember, (valueKind == BindValueKind.RValue) ? LookupResultKind.NotAValue : LookupResultKind.NotAVariable); 6399return BadExpression(elementInitializer, LookupResultKind.NotInvocable); 6440return BadExpression(elementInitializer, LookupResultKind.NotInvocable, ImmutableArray<Symbol>.Empty, boundElementInitializerExpressions); 6873LookupResultKind resultKind; 6878resultKind = LookupResultKind.NotCreatable; 6882resultKind = LookupResultKind.Inaccessible; 6886resultKind = LookupResultKind.OverloadResolutionFailure; 7071return new BoundBadExpression(node, LookupResultKind.OverloadResolutionFailure, ImmutableArray<Symbol>.Empty, children, interfaceType); 7828return new BoundBadExpression(node, LookupResultKind.Ambiguous, lookupResult.Symbols.AsImmutable(), ImmutableArray.Create(boundLeft), CreateErrorType(rightName), hasErrors: true); 7849else if (lookupResult.Kind == LookupResultKind.WrongArity) 7859else if (lookupResult.Kind == LookupResultKind.Empty) 7902return BadExpression(node, LookupResultKind.NotAValue, boundLeft); 8045return BindPropertyAccess(syntax, receiver, propertySymbol, diagnostics, LookupResultKind.Viable, hasErrors: false); 8049return new BoundBadExpression(syntax, LookupResultKind.Viable, errorTypeSymbol.CandidateSymbols!, [receiver], CreateErrorType()); 8279LookupResultKind lookupKind) 8683result = new MethodGroupResolution(bestProperty, LookupResultKind.Viable, diagnostics.ToReadOnly()); 8822var resultSymbol = new ExtendedErrorTypeSymbol(containingSymbol: null, lookupResult.Symbols.ToImmutable(), LookupResultKind.OverloadResolutionFailure, errorInfo, arity); 8823return new MethodGroupResolution(resultSymbol, LookupResultKind.Viable, diagnostics.ToReadOnly()); 8894LookupResultKind resultKind, 9054LookupResultKind lookupResult, 9134LookupResultKind lookupResult, 9179ref LookupResultKind resultKind, 9199resultKind = LookupResultKind.StaticInstanceMismatch; 9208resultKind = LookupResultKind.StaticInstanceMismatch; 9233Debug.Assert(result.Kind != LookupResultKind.Empty); 9646return new BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, childBoundNodes, CreateErrorType(), hasErrors: true); 10498method, lookupError: null, BoundMethodGroupFlags.None, functionType: null, receiver, LookupResultKind.Viable) 10723LookupResultKind methodResultKind = methodResolution.ResultKind; 10724LookupResultKind extensionMethodResultKind = extensionMethodResolution.ResultKind; 10994if (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); 365return CreateBadCall(node, boundExpression, LookupResultKind.Viable, analyzedArguments); 382result = CreateBadCall(node, boundExpression, LookupResultKind.NotInvocable, analyzedArguments); 735anyApplicableCandidates = resolution.ResultKind == LookupResultKind.Viable && resolution.OverloadResolutionResult.HasAnyApplicableMember; 742LookupResultKind resultKind; 775if (resolution.ResultKind != LookupResultKind.Viable) 1358argsToParamsOpt: argsToParams, defaultArguments, resultKind: LookupResultKind.Viable, type: returnType, hasErrors: gotError); 1972LookupResultKind resultKind, 2224LookupResultKind resultKind, 2453LookupResultKind.OverloadResolutionFailure, 2472LookupResultKind.Viable,
Binder\Binder_Lookup.cs (7)
75if (result.Kind != LookupResultKind.Viable && result.Kind != LookupResultKind.Empty) 299if (errorType.ResultKind == LookupResultKind.Inaccessible) 489if (res.Kind == LookupResultKind.Viable) 505if (res.Kind == LookupResultKind.Viable) 748if (result == null || result.Kind != LookupResultKind.Viable || (object)symbol == null) 1038result.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; 1318out LookupResultKind resultKind, 1323resultKind = LookupResultKind.OverloadResolutionFailure; 1350resultKind = LookupResultKind.Viable; 1354resultKind = LookupResultKind.Ambiguous; 1358resultKind = LookupResultKind.OverloadResolutionFailure; 1364resultKind = possiblyBest.HasValue ? LookupResultKind.Viable : LookupResultKind.Empty; 1418out LookupResultKind resultKind, 1443resultKind = LookupResultKind.Viable; 1458resultKind = LookupResultKind.OverloadResolutionFailure; 1462resultKind = LookupResultKind.Ambiguous; 1467resultKind = LookupResultKind.OverloadResolutionFailure; 1473resultKind = possiblyBest.HasValue ? LookupResultKind.Viable : LookupResultKind.Empty; 2286LookupResultKind.Empty, 2307resultKind: LookupResultKind.Viable, 2313LookupResultKind resultKind; 2747resultKind: LookupResultKind.Empty, 2768resultKind: LookupResultKind.Viable, 2772LookupResultKind 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); 959receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType()); 981receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType());
Binder\Binder_Statements.cs (9)
2282else if (conversion.ResultKind == LookupResultKind.OverloadResolutionFailure) 2678LookupResultKind.Viable, 2722var best = this.UnaryOperatorOverloadResolution(UnaryOperatorKind.True, expr, node, diagnostics, out LookupResultKind resultKind, out ImmutableArray<MethodSymbol> originalUserDefinedOperators); 2726Debug.Assert(resultKind == LookupResultKind.Empty, "How could overload resolution fail if a user-defined true operator was found?"); 3934LookupResultKind resultKind = LookupResultKind.Viable; 3964resultKind = LookupResultKind.Inaccessible; 4030resultKind: LookupResultKind.Viable, 4168if (call.ResultKind == LookupResultKind.Empty)
Binder\Binder_Symbols.cs (10)
222case LookupResultKind.Empty: 228case LookupResultKind.Viable: 341return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(GetContainingNamespaceOrNonExtensionType(symbol.Symbol), symbol.Symbol, LookupResultKind.NotATypeOrNamespace, diagnosticInfo)); 592return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(left, LookupResultKind.NotATypeOrNamespace, diagnostics.Add(ErrorCode.ERR_ColColWithTypeAlias, node.Alias.Location, node.Alias.Identifier.Text))); 1477receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.Ambiguous, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(receiver), receiver.Type, hasErrors: true).MakeCompilerGenerated(); 2247LookupResultKind.Ambiguous, 2263singleResult = new ExtendedErrorTypeSymbol(GetContainingNamespaceOrNonExtensionType(singleResult), singleResult, LookupResultKind.NotReferencable, errorInfo); // UNDONE: Review resultkind. 2309if (result.Kind == LookupResultKind.Empty) 2347result.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)
735LookupResultKind.Empty, 944if (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 (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)
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)
373resolution.ResultKind == LookupResultKind.Viable)
Binder\Semantics\OverloadResolution\MethodGroup.cs (10)
22internal LookupResultKind ResultKind { get; private set; } 33LookupResultKind resultKind = LookupResultKind.Viable, 44LookupResultKind resultKind = LookupResultKind.Viable, 69LookupResultKind resultKind = LookupResultKind.Viable, 80private void PopulateHelper(BoundExpression receiverOpt, LookupResultKind resultKind, DiagnosticInfo error) 95this.ResultKind = LookupResultKind.Empty; 134Debug.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)
178if (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 (20)
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, 408LookupResultKind resultKind, 429LookupResultKind resultKind, 442LookupResultKind resultKind, 468LookupResultKind resultKind, 561public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol type) 683LookupResultKind resultKind, 697LookupResultKind resultKind, 711LookupResultKind resultKind, 723LookupResultKind resultKind, 740LookupResultKind resultKind, 747public 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; 1911boundExpr, boundNodeForSyntacticParent, binderOpt, options, out bool isDynamic, out LookupResultKind resultKind, out ImmutableArray<Symbol> unusedMemberGroup); 1915LookupResultKind highestResultKind; 1921if ((symbols.Count != 1 || resultKind == LookupResultKind.OverloadResolutionFailure) && highestSymbols.Count > 0) 1927else if (highestResultKind != LookupResultKind.Empty && highestResultKind < resultKind) 1953if (resultKind == LookupResultKind.Empty) 1957return SymbolInfoFactory.Create(ImmutableArray<Symbol>.Empty, LookupResultKind.Empty, isDynamic); 1977if (resultKind == LookupResultKind.Viable && symbols.Count > 1) 1979resultKind = LookupResultKind.OverloadResolutionFailure; 2288LookupResultKind resultKind; 2334LookupResultKind resultKind = originalErrorSymbol.ResultKind; 2335if (resultKind != LookupResultKind.Empty) 3355out LookupResultKind resultKind, 3360resultKind = LookupResultKind.Viable; 3381if (resultKind == LookupResultKind.NotCreatable) 3387resultKind = LookupResultKind.Empty; 3409((BoundBadExpression)boundNodeForSyntacticParent).ResultKind == LookupResultKind.NotCreatable) 3411resultKind = LookupResultKind.NotCreatable; 3512resultKind = LookupResultKind.Empty; 3521case BoundKind.EventAccess when boundNodeForSyntacticParent is BoundEventAssignmentOperator { ResultKind: LookupResultKind.Viable } parentOperator && 3602Debug.Assert(resultKind != LookupResultKind.Viable); 3681resultKind = resultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 3739private static ParameterSymbol GetThisParameter(TypeSymbol typeOfThis, NamedTypeSymbol containingType, Symbol containingMember, out LookupResultKind resultKind) 3744resultKind = LookupResultKind.NotReferencable; 3758resultKind = LookupResultKind.StaticInstanceMismatch; 3767resultKind = LookupResultKind.NotReferencable; 3774resultKind = LookupResultKind.Viable; 3782resultKind = LookupResultKind.NotReferencable; 3795resultKind = LookupResultKind.NotReferencable; 3802private static void GetSymbolsAndResultKind(BoundUnaryOperator unaryOperator, out bool isDynamic, ref LookupResultKind resultKind, ref OneOrMany<Symbol> symbols) 3807if (operandType == 0 || operandType == UnaryOperatorKind.UserDefined || unaryOperator.ResultKind != LookupResultKind.Viable) 3825private static void GetSymbolsAndResultKind(BoundIncrementOperator increment, out bool isDynamic, ref LookupResultKind resultKind, ref OneOrMany<Symbol> symbols) 3830if (operandType == 0 || operandType == UnaryOperatorKind.UserDefined || increment.ResultKind != LookupResultKind.Viable) 3849private static void GetSymbolsAndResultKind(BoundBinaryOperator binaryOperator, out bool isDynamic, ref LookupResultKind resultKind, ref OneOrMany<Symbol> symbols) 3855if (operandType == 0 || operandType == BinaryOperatorKind.UserDefined || binaryOperator.ResultKind != LookupResultKind.Viable || binaryOperator.OperatorKind.IsLogical()) 3922private static void GetSymbolsAndResultKind(BoundCompoundAssignmentOperator compoundAssignment, out bool isDynamic, ref LookupResultKind resultKind, ref OneOrMany<Symbol> symbols) 3928if (operandType == 0 || operandType == BinaryOperatorKind.UserDefined || compoundAssignment.ResultKind != LookupResultKind.Viable) 3948private static void GetSymbolsAndResultKind(BoundExpression node, Symbol symbolOpt, ImmutableArray<MethodSymbol> originalCandidates, out OneOrMany<Symbol> symbols, out LookupResultKind resultKind) 3963resultKind = LookupResultKind.Empty; 3974ref LookupResultKind resultKind, 3996Debug.Assert(resultKind != LookupResultKind.Viable || 4027ref LookupResultKind resultKind, 4057Debug.Assert(resultKind != LookupResultKind.Viable); 4074Debug.Assert(resultKind != LookupResultKind.Viable); 4075resultKind = resultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 4245out LookupResultKind resultKind, 4254if (resultKind == LookupResultKind.Empty) 4256resultKind = LookupResultKind.Viable; 4281resultKind = LookupResultKind.Viable; 4285resultKind = call.ResultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 4352resultKind = resultKind.WorseResultKind(LookupResultKind.MemberGroup); 4359resultKind = resultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 4374resultKind = resultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 4384if (!isDynamic && resultKind > LookupResultKind.OverloadResolutionFailure) 4386resultKind = LookupResultKind.OverloadResolutionFailure; 4398out LookupResultKind resultKind, 4406if (resultKind == LookupResultKind.Empty) 4408resultKind = LookupResultKind.Viable; 4430resultKind = LookupResultKind.Viable; 4434resultKind = indexer.ResultKind.WorseResultKind(LookupResultKind.OverloadResolutionFailure); 4469if (resultKind > LookupResultKind.OverloadResolutionFailure) 4471resultKind = LookupResultKind.OverloadResolutionFailure; 4574var resultKind = LookupResultKind.Empty; 4710ref LookupResultKind resultKind, 4720LookupResultKind singleKind = singleResult.Kind; 4729resultKind = LookupResultKind.Empty; 4741Debug.Assert((members.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) 5722protected BoundMethodOrPropertyGroup(BoundKind kind, SyntaxNode syntax, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 5731public override LookupResultKind ResultKind { get; } 6073public 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) 6100public BoundMethodGroup Update(ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, ImmutableArray<MethodSymbol> methods, Symbol? lookupSymbolOpt, DiagnosticInfo? lookupError, BoundMethodGroupFlags? flags, FunctionTypeSymbol? functionType, BoundExpression? receiverOpt, LookupResultKind resultKind) 6114public BoundPropertyGroup(SyntaxNode syntax, ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 6128public BoundPropertyGroup Update(ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind) 6142public 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) 6177public override LookupResultKind ResultKind { get; } 6183public 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) 6236public 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) 6262public override LookupResultKind ResultKind { get; } 6267public BoundAttribute Update(MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments, LookupResultKind resultKind, TypeSymbol type) 6742public 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) 6770public override LookupResultKind ResultKind { get; } 6777public 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) 6864public 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) 6890public override LookupResultKind ResultKind { get; } 6895public BoundCollectionElementInitializer Update(MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod, LookupResultKind resultKind, TypeSymbol type) 7256public BoundFieldAccess(SyntaxNode syntax, BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type, bool hasErrors = false) 7275public override LookupResultKind ResultKind { get; } 7282public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type) 7336public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7355public override LookupResultKind ResultKind { get; } 7360public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type) 7374public BoundEventAccess(SyntaxNode syntax, BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7391public override LookupResultKind ResultKind { get; } 7396public BoundEventAccess Update(BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type)
Lowering\ClosureConversion\ClosureConversion.cs (1)
1729return 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)
540new BoundBinaryOperator(syntax, operatorKind, constantValueOpt: null, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Viable, loweredLeft, loweredRight, type); 753return new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, converted, ConstantValue.NotAvailable, MethodSymbol.None, constrainedToTypeOpt: null, LookupResultKind.Viable, boolean) 1996new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, call, ConstantValue.NotAvailable, null, constrainedToTypeOpt: null, LookupResultKind.Viable, returnType); 2026return new BoundBinaryOperator(syntax, operatorKind, constantValueOpt: null, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Empty, loweredLeft, loweredRight, type); 2036? new BoundBinaryOperator(syntax, operatorKind, null, method, constrainedToTypeOpt: null, default(LookupResultKind), loweredLeft, loweredRight, method.ReturnType) 2166LookupResultKind.Viable, 2179LookupResultKind.Viable, 2291LookupResultKind.Viable,
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
446LookupResultKind resultKind, 533resultKind: LookupResultKind.Viable, 1464resultKind: 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)
563currentResult = 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)
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)
241return new BoundBadExpression(Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, type, hasErrors: true); 251return new BoundFieldAccess(Syntax, receiver, f, ConstantValue.NotAvailable, LookupResultKind.Viable, f.Type) { WasCompilerGenerated = true }; 644return new BoundBinaryOperator(this.Syntax, kind, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Viable, left, right, type) { WasCompilerGenerated = true }; 802return new BoundBadExpression(Syntax, default(LookupResultKind), ImmutableArray<Symbol?>.Empty, args.AsImmutable(), receiver); 867invokedAsExtensionMethod: false, argsToParamsOpt: default(ImmutableArray<int>), defaultArguments: default(BitVector), resultKind: LookupResultKind.Viable, 908argsToParamsOpt: ImmutableArray<int>.Empty, defaultArguments: default(BitVector), resultKind: LookupResultKind.Viable, type: method.ReturnType) 1641return new BoundUnaryOperator(expression.Syntax, UnaryOperatorKind.BoolLogicalNegation, expression, null, null, constrainedToTypeOpt: null, LookupResultKind.Viable, expression.Type); 1888new 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"); 643internal 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)
2070return new ExtendedErrorTypeSymbol(declaredBase, LookupResultKind.NotReferencable, info, true);
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
307return 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, 760return new ExtendedErrorTypeSymbol(declaredBase, LookupResultKind.NotReferencable,
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (2)
306resultKind: LookupResultKind.Viable, 369resultKind: LookupResultKind.Viable,