112 references to Viable
Microsoft.CodeAnalysis.CSharp (111)
Binder\Binder.ValueChecks.cs (1)
465Debug.Assert(methodGroup.ResultKind != LookupResultKind.Viable);
Binder\Binder_Attributes.cs (3)
169LookupResultKind resultKind = LookupResultKind.Viable; 270hasErrors: resultKind != LookupResultKind.Viable); 527Debug.Assert(resultKind == LookupResultKind.Viable || wasError);
Binder\Binder_Deconstruct.cs (1)
953resultKind: LookupResultKind.Viable,
Binder\Binder_Expressions.cs (5)
194Debug.Assert(resultKind != LookupResultKind.Viable); 3017LookupResultKind.Viable, 4345resultKind: LookupResultKind.Viable, 4620sourceDelegate.DelegateInvokeMethod, null, BoundMethodGroupFlags.None, functionType: null, argument, LookupResultKind.Viable); 8762method, lookupError: null, BoundMethodGroupFlags.None, functionType: null, receiver, LookupResultKind.Viable)
Binder\Binder_InterpolatedString.cs (3)
403LookupResultKind.Viable, 587if (outConstructorCall is not BoundObjectCreationExpression { ResultKind: LookupResultKind.Viable }) 600if (nonOutConstructorCall is BoundObjectCreationExpression { ResultKind: LookupResultKind.Viable })
Binder\Binder_Invocation.cs (6)
147result = CreateBadCall(node, boundExpression, LookupResultKind.Viable, analyzedArguments); 279return CreateBadCall(node, boundExpression, LookupResultKind.Viable, analyzedArguments); 582anyApplicableCandidates = resolution.ResultKind == LookupResultKind.Viable && resolution.OverloadResolutionResult.HasAnyApplicableMember; 622if (resolution.ResultKind != LookupResultKind.Viable) 1144argsToParamsOpt: argsToParams, defaultArguments, resultKind: LookupResultKind.Viable, type: returnType, hasErrors: gotError); 2066LookupResultKind.Viable,
Binder\Binder_Lookup.cs (5)
69if (result.Kind != LookupResultKind.Viable && result.Kind != LookupResultKind.Empty) 417if (res.Kind == LookupResultKind.Viable) 433if (res.Kind == LookupResultKind.Viable) 675if (result == null || result.Kind != LookupResultKind.Viable || (object)symbol == null) 952result.MergeEqual(new SingleLookupResult(LookupResultKind.Viable, sym, null));
Binder\Binder_Operators.cs (9)
83LookupResultKind.Viable, 418resultKind: LookupResultKind.Viable, 912resultKind: LookupResultKind.Viable, left, right, type: left.Type, hasErrors: constantValue != null && constantValue.IsBad); 1314resultKind = LookupResultKind.Viable; 1328resultKind = possiblyBest.HasValue ? LookupResultKind.Viable : LookupResultKind.Empty; 1407resultKind = LookupResultKind.Viable; 1437resultKind = possiblyBest.HasValue ? LookupResultKind.Viable : LookupResultKind.Empty; 2271resultKind: LookupResultKind.Viable, 2720resultKind: LookupResultKind.Viable,
Binder\Binder_Patterns.cs (1)
366lengthAccess = new BoundPropertyAccess(node, receiverPlaceholder, lengthProperty, LookupResultKind.Viable, lengthProperty.Type) { WasCompilerGenerated = true };
Binder\Binder_Statements.cs (3)
2561LookupResultKind.Viable, 3820LookupResultKind resultKind = LookupResultKind.Viable; 3917resultKind: LookupResultKind.Viable,
Binder\Binder_Symbols.cs (1)
228case LookupResultKind.Viable:
Binder\LookupResult.cs (4)
140return Kind == LookupResultKind.Viable; 151return Kind == LookupResultKind.Viable && _symbolList.Count == 1; 157return new SingleLookupResult(LookupResultKind.Viable, symbol, null); 266else if (Kind != LookupResultKind.Viable)
Binder\LookupResultKind.cs (1)
93case LookupResultKind.Viable:
Binder\MethodGroupResolution.cs (1)
76(this.ResultKind == LookupResultKind.Viable) &&
Binder\Semantics\Conversions\Conversion.cs (2)
945return LookupResultKind.Viable; 953return this.Kind == ConversionKind.NoConversion ? LookupResultKind.Empty : LookupResultKind.Viable;
Binder\Semantics\Conversions\Conversions.cs (1)
256resolution.ResultKind == LookupResultKind.Viable)
Binder\Semantics\OverloadResolution\MethodGroup.cs (3)
34LookupResultKind resultKind = LookupResultKind.Viable, 45LookupResultKind resultKind = LookupResultKind.Viable, 64LookupResultKind resultKind = LookupResultKind.Viable,
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
151if (res.Kind == LookupResultKind.Viable)
BoundTree\BoundExpression.cs (2)
102return LookupResultKind.Viable; 258return LookupResultKind.Viable;
BoundTree\Constructors.cs (2)
19: this(syntax, receiver, fieldSymbol, constantValueOpt, LookupResultKind.Viable, fieldSymbol.Type, hasErrors) 191resultKind: LookupResultKind.Viable,
BoundTree\VariablePendingInference.cs (1)
102LookupResultKind.Viable,
Compilation\CSharpSemanticModel.cs (16)
1990if (resultKind == LookupResultKind.Viable && symbols.Length > 1) 3345resultKind = LookupResultKind.Viable; 3505case BoundKind.EventAccess when boundNodeForSyntacticParent is BoundEventAssignmentOperator { ResultKind: LookupResultKind.Viable } parentOperator && 3586Debug.Assert(resultKind != LookupResultKind.Viable); 3754resultKind = LookupResultKind.Viable; 3787if (operandType == 0 || operandType == UnaryOperatorKind.UserDefined || unaryOperator.ResultKind != LookupResultKind.Viable) 3810if (operandType == 0 || operandType == UnaryOperatorKind.UserDefined || increment.ResultKind != LookupResultKind.Viable) 3834if (operandType == 0 || operandType == BinaryOperatorKind.UserDefined || binaryOperator.ResultKind != LookupResultKind.Viable || binaryOperator.OperatorKind.IsLogical()) 3907if (operandType == 0 || operandType == BinaryOperatorKind.UserDefined || compoundAssignment.ResultKind != LookupResultKind.Viable) 3975Debug.Assert(resultKind != LookupResultKind.Viable || 4036Debug.Assert(resultKind != LookupResultKind.Viable); 4053Debug.Assert(resultKind != LookupResultKind.Viable); 4232resultKind = LookupResultKind.Viable; 4257resultKind = LookupResultKind.Viable; 4377resultKind = LookupResultKind.Viable; 4399resultKind = LookupResultKind.Viable;
Compilation\SymbolInfoFactory.cs (1)
31else if (resultKind == LookupResultKind.Viable)
Compilation\SyntaxTreeSemanticModel.cs (1)
263result = SymbolInfoFactory.Create(symbols, LookupResultKind.Viable, isDynamic: false);
Compiler\MethodBodySynthesizer.cs (2)
55resultKind: LookupResultKind.Viable, 498resultKind: LookupResultKind.Viable,
FlowAnalysis\NullableWalker.cs (2)
9044left = new BoundPropertyAccess(fieldAccess.Syntax, fieldAccess.ReceiverOpt, autoProperty, LookupResultKind.Viable, autoProperty.Type, fieldAccess.HasErrors); 9047left = new BoundEventAccess(fieldAccess.Syntax, fieldAccess.ReceiverOpt, @event, isUsableAsField: true, LookupResultKind.Viable, @event.Type, fieldAccess.HasErrors);
Lowering\LocalRewriter\LocalRewriter.cs (1)
280var result = new BoundFieldAccess(node.Syntax, new BoundThisReference(node.Syntax, primaryCtor.ContainingType), field, ConstantValue.NotAvailable, LookupResultKind.Viable, node.Type);
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 (6)
532new BoundBinaryOperator(syntax, operatorKind, constantValueOpt: null, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Viable, loweredLeft, loweredRight, type); 745return new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, converted, ConstantValue.NotAvailable, MethodSymbol.None, constrainedToTypeOpt: null, LookupResultKind.Viable, boolean) 1910new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, call, ConstantValue.NotAvailable, null, constrainedToTypeOpt: null, LookupResultKind.Viable, returnType); 2080LookupResultKind.Viable, 2093LookupResultKind.Viable, 2205LookupResultKind.Viable,
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
297resultKind: LookupResultKind.Viable, 1305resultKind: LookupResultKind.Viable,
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (5)
394resultKind: LookupResultKind.Viable, 591resultKind: LookupResultKind.Viable, 770resultKind: LookupResultKind.Viable, 949resultKind: LookupResultKind.Viable, 1045resultKind: LookupResultKind.Viable,
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (1)
348resultKind: LookupResultKind.Viable,
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (2)
84oldNodeOpt.Update(rewrittenReceiver, property, LookupResultKind.Viable, property.Type) : 85new BoundPropertyAccess(syntax, rewrittenReceiver, property, LookupResultKind.Viable, property.Type);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (2)
153LookupResultKind.Viable, 170new BoundUnaryOperator(syntax, kind, loweredOperand, null, methodOpt: method, constrainedToTypeOpt: constrainedToTypeOpt, LookupResultKind.Viable, type);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
521resultKind: LookupResultKind.Viable,
Lowering\SyntheticBoundNodeFactory.cs (6)
290return new BoundFieldAccess(Syntax, receiver, f, ConstantValue.NotAvailable, LookupResultKind.Viable, f.Type) { WasCompilerGenerated = true }; 599return new BoundBinaryOperator(this.Syntax, kind, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Viable, left, right, type) { WasCompilerGenerated = true }; 816invokedAsExtensionMethod: false, argsToParamsOpt: default(ImmutableArray<int>), defaultArguments: default(BitVector), resultKind: LookupResultKind.Viable, 827argsToParamsOpt: ImmutableArray<int>.Empty, defaultArguments: default(BitVector), resultKind: LookupResultKind.Viable, type: method.ReturnType) 1499return new BoundUnaryOperator(expression.Syntax, UnaryOperatorKind.BoolLogicalNegation, expression, null, null, constrainedToTypeOpt: null, LookupResultKind.Viable, expression.Type); 1742new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, call, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Viable, returnType);
Operations\CSharpOperationFactory.cs (1)
475if (boundFunctionPointerInvocation.ResultKind != LookupResultKind.Viable)
Symbols\ErrorTypeSymbol.cs (1)
70Debug.Assert(ResultKind != LookupResultKind.Viable, "Shouldn't have viable result kind on error symbol");
Symbols\ExtendedErrorTypeSymbol.cs (1)
79Debug.Assert(candidateSymbols.IsEmpty || resultKind != LookupResultKind.Viable, "Shouldn't use LookupResultKind.Viable with candidate symbols");
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (2)
305resultKind: LookupResultKind.Viable, 356resultKind: LookupResultKind.Viable,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DocumentationComments\CrefTests.cs (1)
5529Assert.Equal(LookupResultKind.Viable, lookupResult.Kind);