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