134 references to MemberResolutionKind
Microsoft.CodeAnalysis.CSharp (134)
Binder\Binder_Attributes.cs (1)
222
expanded = memberResolutionResult.Resolution ==
MemberResolutionKind
.ApplicableInExpandedForm;
Binder\Binder_Expressions.cs (6)
3383
bool expanded = result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm;
3698
if (memberAnalysisResult.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm && correspondingParameter.Ordinal == parameters.Length - 1)
3814
(memberAnalysisResult.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm && originalParameterIndex + 1 == parameters.Length))
4968
var expanded = memberResolutionResult.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm;
6764
var expanded = memberResolutionResult.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm;
9869
expanded: resolutionResult.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm,
Binder\Binder_Invocation.cs (3)
680
if (candidate.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm &&
860
candidate.Result.Kind ==
MemberResolutionKind
.ApplicableInNormalForm)
1200
var expanded = methodResult.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm;
Binder\ForEachLoopBinder.cs (2)
1464
var expanded = overloadResolutionResult.ValidResult.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm;
1547
expanded: overloadResolutionResult.ValidResult.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm,
Binder\Semantics\OverloadResolution\MemberAnalysisResult.cs (42)
107
public readonly
MemberResolutionKind
Kind;
118
MemberResolutionKind
kind,
128
Debug.Assert(kind !=
MemberResolutionKind
.ApplicableInExpandedForm || definitionParamsElementTypeOpt.HasType);
129
Debug.Assert(kind !=
MemberResolutionKind
.ApplicableInExpandedForm || paramsElementTypeOpt.HasType);
182
case
MemberResolutionKind
.ApplicableInNormalForm:
183
case
MemberResolutionKind
.ApplicableInExpandedForm:
184
case
MemberResolutionKind
.Worse:
185
case
MemberResolutionKind
.Worst:
199
case
MemberResolutionKind
.ApplicableInNormalForm:
200
case
MemberResolutionKind
.ApplicableInExpandedForm:
209
/// Returns false for <see cref="
MemberResolutionKind
.UnsupportedMetadata"/>
221
private static bool SuppressUseSiteDiagnosticsForKind(
MemberResolutionKind
kind)
225
case
MemberResolutionKind
.UnsupportedMetadata:
227
case
MemberResolutionKind
.NoCorrespondingParameter:
228
case
MemberResolutionKind
.NoCorrespondingNamedParameter:
229
case
MemberResolutionKind
.DuplicateNamedArgument:
230
case
MemberResolutionKind
.NameUsedForPositional:
231
case
MemberResolutionKind
.RequiredParameterMissing:
232
case
MemberResolutionKind
.LessDerived:
265
MemberResolutionKind
.NameUsedForPositional,
272
MemberResolutionKind
.BadNonTrailingNamedArgument,
279
MemberResolutionKind
.NoCorrespondingParameter,
286
MemberResolutionKind
.NoCorrespondingNamedParameter,
293
MemberResolutionKind
.DuplicateNamedArgument,
307
MemberResolutionKind
.RequiredParameterMissing,
313
return new MemberAnalysisResult(
MemberResolutionKind
.UseSiteError);
318
return new MemberAnalysisResult(
MemberResolutionKind
.UnsupportedMetadata);
326
MemberResolutionKind
.BadArgumentConversion,
336
return new MemberAnalysisResult(
MemberResolutionKind
.InaccessibleTypeArgument);
341
return new MemberAnalysisResult(
MemberResolutionKind
.TypeInferenceFailed);
346
return new MemberAnalysisResult(
MemberResolutionKind
.TypeInferenceExtensionInstanceArgument);
351
return new MemberAnalysisResult(
MemberResolutionKind
.StaticInstanceMismatch);
357
MemberResolutionKind
.ConstructedParameterFailedConstraintCheck,
363
return new MemberAnalysisResult(
MemberResolutionKind
.WrongRefKind);
368
return new MemberAnalysisResult(
MemberResolutionKind
.WrongReturnType);
373
return new MemberAnalysisResult(
MemberResolutionKind
.LessDerived);
378
return new MemberAnalysisResult(
MemberResolutionKind
.ApplicableInNormalForm, BitVector.Null, argsToParamsOpt, conversions, hasAnyRefOmittedArgument: hasAnyRefOmittedArgument);
384
MemberResolutionKind
.ApplicableInExpandedForm, BitVector.Null, argsToParamsOpt, conversions,
390
return new MemberAnalysisResult(
MemberResolutionKind
.Worse);
395
return new MemberAnalysisResult(
MemberResolutionKind
.Worst);
400
return new MemberAnalysisResult(
MemberResolutionKind
.ConstraintFailure, constraintFailureDiagnosticsOpt: constraintFailureDiagnostics);
405
return new MemberAnalysisResult(
MemberResolutionKind
.WrongCallingConvention);
Binder\Semantics\OverloadResolution\MemberResolutionResult.cs (1)
72
public
MemberResolutionKind
Resolution
Binder\Semantics\OverloadResolution\OverloadResolution.cs (34)
270
var hasExpandedForm = results.Any(static r => r.Resolution ==
MemberResolutionKind
.ApplicableInExpandedForm);
271
if (hasExpandedForm && results.Any(static r => r.Resolution ==
MemberResolutionKind
.ApplicableInNormalForm))
655
if ((result.Result.IsValid || result.Result.Kind ==
MemberResolutionKind
.ConstructedParameterFailedConstraintCheck) &&
1041
Debug.Assert(!result.IsValid || result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm);
1233
case
MemberResolutionKind
.RequiredParameterMissing:
1234
case
MemberResolutionKind
.NoCorrespondingParameter:
1237
case
MemberResolutionKind
.BadArgumentConversion:
1238
case
MemberResolutionKind
.NameUsedForPositional:
1239
case
MemberResolutionKind
.TypeInferenceFailed:
1240
case
MemberResolutionKind
.TypeInferenceExtensionInstanceArgument:
1241
case
MemberResolutionKind
.ConstructedParameterFailedConstraintCheck:
1242
case
MemberResolutionKind
.NoCorrespondingNamedParameter:
1243
case
MemberResolutionKind
.UseSiteError:
1244
case
MemberResolutionKind
.BadNonTrailingNamedArgument:
1245
case
MemberResolutionKind
.DuplicateNamedArgument:
1250
case
MemberResolutionKind
.BadArgumentConversion:
1251
if (expandedResult.Result.Kind ==
MemberResolutionKind
.BadArgumentConversion &&
2340
if (m1.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm)
2342
if (m2.Result.Kind !=
MemberResolutionKind
.ApplicableInExpandedForm)
2347
else if (m2.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm)
2349
Debug.Assert(m1.Result.Kind !=
MemberResolutionKind
.ApplicableInExpandedForm);
2386
if (m1.Result.Kind ==
MemberResolutionKind
.ApplicableInNormalForm && m2.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm)
2391
if (m1.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm && m2.Result.Kind ==
MemberResolutionKind
.ApplicableInNormalForm)
2407
if (m1.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm && m2.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm)
2424
bool hasAll1 = m1.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm || m1ParameterCount == arguments.Count;
2425
bool hasAll2 = m2.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm || m2ParameterCount == arguments.Count;
2514
if (m1.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm && m2.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm)
2556
if (result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm &&
2662
if (m.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm)
4138
Debug.Assert(!result.Result.IsValid || result.Result.Kind ==
MemberResolutionKind
.ApplicableInExpandedForm);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (45)
213
AssertNone(
MemberResolutionKind
.None);
231
AssertNone(
MemberResolutionKind
.ApplicableInNormalForm);
232
AssertNone(
MemberResolutionKind
.ApplicableInExpandedForm);
253
AssertNone(
MemberResolutionKind
.Worse);
301
AssertNone(
MemberResolutionKind
.ConstraintFailure);
306
AssertNone(
MemberResolutionKind
.LessDerived);
317
AssertNone(
MemberResolutionKind
.BadArgumentConversion);
329
AssertNone(
MemberResolutionKind
.ConstructedParameterFailedConstraintCheck);
340
AssertNone(
MemberResolutionKind
.InaccessibleTypeArgument);
351
AssertNone(
MemberResolutionKind
.TypeInferenceFailed);
352
AssertNone(
MemberResolutionKind
.TypeInferenceExtensionInstanceArgument);
367
AssertNone(
MemberResolutionKind
.UseSiteError);
392
case
MemberResolutionKind
.UnsupportedMetadata:
398
case
MemberResolutionKind
.NoCorrespondingNamedParameter:
405
case
MemberResolutionKind
.NoCorrespondingParameter:
411
case
MemberResolutionKind
.RequiredParameterMissing:
422
case
MemberResolutionKind
.NameUsedForPositional:
429
case
MemberResolutionKind
.BadNonTrailingNamedArgument:
436
case
MemberResolutionKind
.DuplicateNamedArgument:
445
case
MemberResolutionKind
.WrongCallingConvention:
474
&& firstSupported.Result.Kind ==
MemberResolutionKind
.NoCorrespondingNamedParameter)
484
else if (!(firstSupported.Result.Kind ==
MemberResolutionKind
.RequiredParameterMissing && supportedRequiredParameterMissingConflicts)
494
case
MemberResolutionKind
.NameUsedForPositional:
500
case
MemberResolutionKind
.NoCorrespondingNamedParameter:
507
case
MemberResolutionKind
.RequiredParameterMissing:
533
case
MemberResolutionKind
.NoCorrespondingParameter:
538
case
MemberResolutionKind
.BadNonTrailingNamedArgument:
542
case
MemberResolutionKind
.DuplicateNamedArgument:
547
else if (firstSupported.Result.Kind ==
MemberResolutionKind
.WrongCallingConvention)
597
Debug.Assert(firstSupported.Result.Kind ==
MemberResolutionKind
.WrongCallingConvention);
606
var bad = GetFirstMemberKind(
MemberResolutionKind
.UseSiteError);
625
var inaccessible = GetFirstMemberKind(
MemberResolutionKind
.InaccessibleTypeArgument);
648
var staticInstanceMismatch = GetFirstMemberKind(
MemberResolutionKind
.StaticInstanceMismatch);
699
var mismatch = GetFirstMemberKind(
MemberResolutionKind
.WrongRefKind);
707
mismatch = GetFirstMemberKind(
MemberResolutionKind
.WrongReturnType);
720
var constraintFailure = GetFirstMemberKind(
MemberResolutionKind
.ConstraintFailure);
746
var inferenceFailed = GetFirstMemberKind(
MemberResolutionKind
.TypeInferenceFailed);
766
inferenceFailed = GetFirstMemberKind(
MemberResolutionKind
.TypeInferenceExtensionInstanceArgument);
1032
var result = GetFirstMemberKind(
MemberResolutionKind
.ConstructedParameterFailedConstraintCheck);
1090
var badArg = GetFirstMemberKind(
MemberResolutionKind
.BadArgumentConversion);
1434
if (res.Result.Kind ==
MemberResolutionKind
.Worse)
1522
private void AssertNone(
MemberResolutionKind
kind)
1533
private MemberResolutionResult<TMember> GetFirstMemberKind(
MemberResolutionKind
kind)
1563
else if (System.Linq.Enumerable.Any(ResultsBuilder, x => (x.Result.Kind ==
MemberResolutionKind
.TypeInferenceFailed) || (x.Result.Kind ==
MemberResolutionKind
.TypeInferenceExtensionInstanceArgument)))