98 references to Empty
Microsoft.CodeAnalysis.CSharp (98)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
87
LookupResultKind.
Empty
,
Binder\Binder_Attributes.cs (1)
523
var badLHS = BadExpression(nameSyntax, lookupResultKind: LookupResultKind.
Empty
);
Binder\Binder_Conversions.cs (1)
2298
? new BoundBadExpression(node.WithElement!.Syntax, LookupResultKind.
Empty
, symbols: [], naturalWithArguments, CreateErrorType())
Binder\Binder_Expressions.cs (21)
120
return BadExpression(syntax, LookupResultKind.
Empty
, ImmutableArray<Symbol>.Empty);
128
return BadExpression(syntax, LookupResultKind.
Empty
, ImmutableArray<Symbol>.Empty, childNode);
136
return BadExpression(syntax, LookupResultKind.
Empty
, ImmutableArray<Symbol>.Empty, childNodes);
218
private BoundExpression ToBadExpression(BoundExpression expr, LookupResultKind resultKind = LookupResultKind.
Empty
)
893
node, LookupResultKind.
Empty
, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(BindToTypeForErrorRecovery(BindValue(node.Expression, BindingDiagnosticBag.Discarded, BindValueKind.RefersToLocation))),
1080
argumentSyntax, LookupResultKind.
Empty
, ImmutableArray<Symbol>.Empty,
1529
bool result = lookupResult.Kind != LookupResultKind.
Empty
;
1587
if (type is ErrorTypeSymbol { ResultKind: LookupResultKind.
Empty
})
1696
if (lookupResult.Kind != LookupResultKind.
Empty
)
4324
LookupResultKind.
Empty
,
4632
LookupResultKind.
Empty
,
4964
resultKind: LookupResultKind.
Empty
,
4975
resultKind: LookupResultKind.
Empty
,
5018
resultKind: LookupResultKind.
Empty
,
5341
return new BoundBadExpression(syntax, LookupResultKind.
Empty
, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, CreateErrorType());
5467
arg.Syntax, LookupResultKind.
Empty
, symbols: [],
5944
LookupResultKind.
Empty
,
6257
case LookupResultKind.
Empty
:
8101
else if (lookupResult.Kind == LookupResultKind.
Empty
)
9499
Debug.Assert(result.Kind != LookupResultKind.
Empty
);
9921
return new BoundBadExpression(node, LookupResultKind.
Empty
, ImmutableArray<Symbol>.Empty, childBoundNodes, CreateErrorType(), hasErrors: true);
Binder\Binder_Invocation.cs (1)
122
return BadExpression(node, LookupResultKind.
Empty
, ImmutableArray.Create(symbol), args.Add(receiver), wasCompilerGenerated: true);
Binder\Binder_Lookup.cs (2)
75
if (result.Kind != LookupResultKind.Viable && result.Kind != LookupResultKind.
Empty
)
210
if (resultOfThisMember.Kind == LookupResultKind.
Empty
)
Binder\Binder_Operators.cs (29)
62
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, LookupResultKind.
Empty
, CreateErrorType(), hasErrors: true);
107
leftPlaceholder: null, leftConversion: null, finalPlaceholder: null, finalConversion: null, LookupResultKind.
Empty
, CreateErrorType(), hasErrors: true);
162
Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
);
164
Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
) || originalUserDefinedOperators.IsEmpty);
168
Debug.Assert(resultKind is LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
);
587
staticResultKind = LookupResultKind.
Empty
;
949
return new BoundBinaryOperator(node, kind, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.
Empty
, left, right, GetBinaryOperatorErrorType(kind, diagnostics, node), true);
990
return new BoundBinaryOperator(node, BinaryOperatorKind.StringConcatenation, BoundBinaryOperator.UncommonData.UnconvertedInterpolatedStringAddition(stringConstant), LookupResultKind.
Empty
, left, right, right.Type);
1458
resultKind: LookupResultKind.
Empty
, left, right, type: GetBinaryOperatorErrorType(kind, diagnostics, node), hasErrors: true);
2059
Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
);
2061
Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
) || originalUserDefinedOperators.IsEmpty);
2065
Debug.Assert(resultKind is LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
);
2098
resultKind = LookupResultKind.
Empty
;
2169
Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
);
2171
Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
) || originalUserDefinedOperators.IsEmpty);
2209
resultKind = possiblyBest.HasValue ? LookupResultKind.Viable : LookupResultKind.
Empty
;
2267
Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
);
2269
Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
) || originalUserDefinedOperators.IsEmpty);
2273
Debug.Assert(resultKind is LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
);
2316
Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
);
2318
Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
) || originalUserDefinedOperators.IsEmpty);
2379
resultKind = possiblyBest.HasValue ? LookupResultKind.Viable : LookupResultKind.
Empty
;
2410
resultKind = LookupResultKind.
Empty
;
3268
LookupResultKind.
Empty
,
3319
Debug.Assert(resultKind is LookupResultKind.Viable or LookupResultKind.Ambiguous or LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
);
3321
Debug.Assert(resultKind is not (LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
) || originalUserDefinedOperators.IsEmpty);
3325
Debug.Assert(resultKind is LookupResultKind.OverloadResolutionFailure or LookupResultKind.
Empty
);
3673
staticResultKind = LookupResultKind.
Empty
;
4340
resultKind: LookupResultKind.
Empty
,
Binder\Binder_Patterns.cs (2)
591
lengthAccess = new BoundBadExpression(node, LookupResultKind.
Empty
, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, CreateErrorType(), hasErrors: true) { WasCompilerGenerated = true };
2008
case LookupResultKind.
Empty
:
Binder\Binder_Query.cs (3)
741
yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.
Empty
, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), CreateErrorType());
747
yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.
Empty
, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), yExpression.Type);
808
field2Value = new BoundBadExpression(field2Value.Syntax, LookupResultKind.
Empty
, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(field2Value), field2Value.Type, true);
Binder\Binder_Statements.cs (1)
4233
if (call.ResultKind == LookupResultKind.
Empty
)
Binder\Binder_Symbols.cs (3)
224
case LookupResultKind.
Empty
:
1532
receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.
Empty
, ImmutableArray<Symbol>.Empty, childBoundNodes: [AdjustBadExpressionChild(receiver)], receiver.Type, hasErrors: true).MakeCompilerGenerated();
2386
if (result.Kind == LookupResultKind.
Empty
)
Binder\Binder_XmlNameAttribute.cs (1)
33
if (lookupResult.Kind == LookupResultKind.
Empty
)
Binder\ForEachLoopBinder.cs (1)
747
LookupResultKind.
Empty
,
Binder\LookupResult.cs (4)
78
_kind = LookupResultKind.
Empty
;
87
return _kind == LookupResultKind.
Empty
&& _error == null && _symbolList.Count == 0;
93
_kind = LookupResultKind.
Empty
;
167
return new SingleLookupResult(LookupResultKind.
Empty
, null, null);
Binder\LookupResultKind.cs (3)
78
case LookupResultKind.
Empty
: return CandidateReason.None;
105
if (resultKind1 == LookupResultKind.
Empty
)
107
if (resultKind2 == LookupResultKind.
Empty
)
Binder\Semantics\Conversions\Conversion.cs (1)
1102
return this.Kind == ConversionKind.NoConversion ? LookupResultKind.
Empty
: LookupResultKind.Viable;
Binder\Semantics\OverloadResolution\MethodGroup.cs (2)
95
this.ResultKind = LookupResultKind.
Empty
;
134
Debug.Assert(this.ResultKind == LookupResultKind.
Empty
);
Binder\SingleLookupResult.cs (1)
31
Debug.Assert(symbol is not null || kind == LookupResultKind.
Empty
);
Binder\SwitchBinder.cs (1)
468
return new BoundBadExpression(node, LookupResultKind.
Empty
, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(switchGoverningExpression), switchGoverningType ?? CreateErrorType());
Compilation\CSharpSemanticModel.cs (12)
1941
if (highestResultKind != LookupResultKind.
Empty
&& highestResultKind < resultKind)
1965
if (resultKind == LookupResultKind.
Empty
)
1969
return SymbolInfoFactory.Create(ImmutableArray<Symbol>.Empty, LookupResultKind.
Empty
, isDynamic);
2338
if (resultKind != LookupResultKind.
Empty
)
3390
resultKind = LookupResultKind.
Empty
;
3516
resultKind = LookupResultKind.
Empty
;
3985
resultKind = LookupResultKind.
Empty
;
4276
if (resultKind == LookupResultKind.
Empty
)
4428
if (resultKind == LookupResultKind.
Empty
)
4596
var resultKind = LookupResultKind.
Empty
;
4751
resultKind = LookupResultKind.
Empty
;
4763
Debug.Assert((members.Count == 0) == (resultKind == LookupResultKind.
Empty
));
Lowering\ClosureConversion\ClosureConversion.cs (1)
1735
return new BoundBadExpression(F.Syntax, LookupResultKind.
Empty
, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (1)
2039
return new BoundBinaryOperator(syntax, operatorKind, constantValueOpt: null, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.
Empty
, loweredLeft, loweredRight, type);
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
228
: new BoundBadExpression(syntax, LookupResultKind.
Empty
, symbols: ImmutableArray<Symbol?>.Empty, childBoundNodes: ImmutableArray<BoundExpression>.Empty, type);
Lowering\LocalRewriter\LoweredDynamicOperation.cs (1)
55
var bad = new BoundBadExpression(children[0].Syntax, LookupResultKind.
Empty
, ImmutableArray<Symbol?>.Empty, children, resultType);
Lowering\SyntheticBoundNodeFactory.cs (1)
241
return new BoundBadExpression(Syntax, LookupResultKind.
Empty
, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, type, hasErrors: true);
Symbols\ErrorTypeSymbol.cs (1)
35
internal virtual LookupResultKind ResultKind { get { return LookupResultKind.
Empty
; } }
Symbols\ExtendedErrorTypeSymbol.cs (1)
49
_resultKind = LookupResultKind.
Empty
;