12 instantiations of MemberResolutionResult
Microsoft.CodeAnalysis.CSharp (12)
Binder\Semantics\OverloadResolution\MemberResolutionResult.cs (1)
36
return new
MemberResolutionResult
<TMember>(Member, LeastOverriddenMember, result, HasTypeArgumentInferredFromFunctionType);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (11)
928
results.Add(new
MemberResolutionResult
<MethodSymbol>(constructor, constructor, MemberAnalysisResult.UnsupportedMetadata(), hasTypeArgumentInferredFromFunctionType: false));
950
results.Add(new
MemberResolutionResult
<MethodSymbol>(constructor, constructor, result, hasTypeArgumentInferredFromFunctionType: false));
1147
results.Add(new
MemberResolutionResult
<TMember>(member, leastOverriddenMember, MemberAnalysisResult.UnsupportedMetadata(), hasTypeArgumentInferredFromFunctionType: false));
4029
return new
MemberResolutionResult
<TMember>(member, leastOverriddenMember, MemberAnalysisResult.ArgumentParameterMismatch(argumentAnalysis), hasTypeArgumentInferredFromFunctionType: false);
4037
return new
MemberResolutionResult
<TMember>(member, leastOverriddenMember, MemberAnalysisResult.UseSiteError(), hasTypeArgumentInferredFromFunctionType: false);
4073
return new
MemberResolutionResult
<TMember>(member, leastOverriddenMember, MemberAnalysisResult.ArgumentParameterMismatch(argumentAnalysis), hasTypeArgumentInferredFromFunctionType: false);
4099
return new
MemberResolutionResult
<TMember>(member, leastOverriddenMember, MemberAnalysisResult.ArgumentParameterMismatch(argumentAnalysis), hasTypeArgumentInferredFromFunctionType: false);
4106
return new
MemberResolutionResult
<TMember>(member, leastOverriddenMember, MemberAnalysisResult.UseSiteError(), hasTypeArgumentInferredFromFunctionType: false);
4206
return new
MemberResolutionResult
<TMember>(member, leastOverriddenMember, inferenceError, hasTypeArgumentInferredFromFunctionType: false);
4246
return new
MemberResolutionResult
<TMember>(member, leastOverriddenMember, MemberAnalysisResult.ConstructedParameterFailedConstraintsCheck(i), hasTypeArgumentsInferredFromFunctionType);
4280
return new
MemberResolutionResult
<TMember>(member, leastOverriddenMember, applicableResult, hasTypeArgumentsInferredFromFunctionType);
126 references to MemberResolutionResult
Microsoft.CodeAnalysis.CSharp (126)
Binder\Binder_Attributes.cs (1)
205
out
var
memberResolutionResult,
Binder\Binder_Expressions.cs (13)
3374
MemberResolutionResult
<TMember> methodResult,
3500
in
MemberResolutionResult
<TMember> methodResult,
3557
in
MemberResolutionResult
<TMember> methodResult,
3589
in
MemberResolutionResult
<TMember> methodResult,
3663
void reportUnsafeIfNeeded(
MemberResolutionResult
<TMember> methodResult, BindingDiagnosticBag diagnostics, BoundExpression argument, TypeWithAnnotations parameterTypeWithAnnotations)
4881
MemberResolutionResult
<MethodSymbol> memberResolutionResult;
4915
MemberResolutionResult
<MethodSymbol> memberResolutionResult,
6695
out
MemberResolutionResult
<MethodSymbol> memberResolutionResult,
6715
MemberResolutionResult
<MethodSymbol> memberResolutionResult,
6799
MemberResolutionResult
<MethodSymbol> memberResolutionResult,
7099
out
MemberResolutionResult
<MethodSymbol> memberResolutionResult,
7149
default(
MemberResolutionResult
<MethodSymbol>); // Invalid results are not interesting - we have enough info in candidateConstructors.
9839
MemberResolutionResult
<PropertySymbol> resolutionResult = overloadResolutionResult.ValidResult;
Binder\Binder_Invocation.cs (13)
55
foreach (
var
result in overloadResolutionResult.Results)
649
var
applicable = overloadResolutionResult.Results.Single(r => r.IsApplicable);
664
private static bool HasApplicableConditionalMethod(ImmutableArray<
MemberResolutionResult
<MethodSymbol>> finalApplicableCandidates)
666
foreach (
var
candidate in finalApplicableCandidates)
677
private void ReportMemberNotSupportedByDynamicDispatch<TMember>(SyntaxNode syntax,
MemberResolutionResult
<TMember> candidate, BindingDiagnosticBag diagnostics)
846
private void ReportDynamicInvocationWarnings(SyntaxNode syntax, BoundMethodGroup methodGroup, BindingDiagnosticBag diagnostics, ImmutableArray<
MemberResolutionResult
<MethodSymbol>> finalApplicableCandidates)
856
private bool IsAmbiguousDynamicParamsArgument<TMethodOrPropertySymbol>(ArrayBuilder<BoundExpression> arguments,
MemberResolutionResult
<TMethodOrPropertySymbol> candidate, out SyntaxNode argumentSyntax)
886
MemberResolutionResult
<MethodSymbol> methodResolutionResult,
942
MemberResolutionResult
<MethodSymbol> methodResolutionResult)
970
private ImmutableArray<
MemberResolutionResult
<TMethodOrPropertySymbol>> GetCandidatesPassingFinalValidation<TMethodOrPropertySymbol>(
980
var finalCandidates = ArrayBuilder<
MemberResolutionResult
<TMethodOrPropertySymbol>>.GetInstance();
1184
var
methodResult = result.ValidResult;
2390
MemberResolutionResult
<FunctionPointerMethodSymbol> methodResult = overloadResolutionResult.ValidResult;
Binder\Semantics\OverloadResolution\MemberResolutionResult.cs (3)
34
internal
MemberResolutionResult
<TMember> WithResult(MemberAnalysisResult result)
99
internal
MemberResolutionResult
<TMember> Worse()
104
internal
MemberResolutionResult
<TMember> Worst()
Binder\Semantics\OverloadResolution\OverloadResolution.cs (47)
65
private static bool AnyValidResult<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results)
79
private static bool SingleValidResult<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results)
319
private static bool OverloadResolutionResultIsValid<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results, bool hasDynamicArgument)
351
ArrayBuilder<
MemberResolutionResult
<TMember>> results,
427
ArrayBuilder<
MemberResolutionResult
<TMember>> results,
479
RemoveLowerPriorityMembers<
MemberResolutionResult
<TMember>, TMember>(results);
493
private static void RemoveHiddenMembers<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results)
580
ArrayBuilder<
MemberResolutionResult
<TMember>> results,
609
private static void RemoveStaticInstanceMismatches<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results, bool requireStatic) where TMember : Symbol
622
private static void RemoveMethodsNotDeclaredStatic<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results) where TMember : Symbol
638
private void RemoveConstraintViolations<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results, CompoundUseSiteInfo<AssemblySymbol> template) where TMember : Symbol
665
private void RemoveCallingConventionMismatches<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results, in CallingConventionInfo expectedConvention) where TMember : Symbol
789
static
MemberResolutionResult
<TMember> makeWrongCallingConvention(
MemberResolutionResult
<TMember> result)
837
ArrayBuilder<
MemberResolutionResult
<TMember>> results,
919
private void AddConstructorToCandidateSet(MethodSymbol constructor, ArrayBuilder<
MemberResolutionResult
<MethodSymbol>> results,
1047
ArrayBuilder<
MemberResolutionResult
<TMember>> results,
1165
var
normalResult = skipNormalResult
1166
? default(
MemberResolutionResult
<TMember>)
1176
var
result = normalResult;
1186
var
expandedResult = IsMemberApplicableInExpandedForm(
1223
private static bool PreferExpandedFormOverNormalForm<TMember>(
MemberResolutionResult
<TMember> normalResult,
MemberResolutionResult
<TMember> expandedResult)
1266
static bool haveBadArgumentForLastParameter(
MemberResolutionResult
<TMember> result)
1459
private void RemoveInaccessibleTypeArguments<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1481
private static void RemoveLessDerivedMembers<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1604
private static bool IsLessDerivedThanAny<TMember>(int index, TypeSymbol type, ArrayBuilder<
MemberResolutionResult
<TMember>> results, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1647
private static void RemoveAllInterfaceMembers<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results)
1723
ArrayBuilder<
MemberResolutionResult
<MethodSymbol>> results,
1753
RemoveLowerPriorityMembers<
MemberResolutionResult
<MethodSymbol>, MethodSymbol>(results);
1765
private static void ReportUseSiteInfo<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1768
foreach (
MemberResolutionResult
<TMember> result in results)
1774
private int GetTheBestCandidateIndex<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results, AnalyzedArguments arguments, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1914
private void RemoveWorseMembers<TMember>(ArrayBuilder<
MemberResolutionResult
<TMember>> results, AnalyzedArguments arguments, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2071
MemberResolutionResult
<TMember> m1,
2072
MemberResolutionResult
<TMember> m2,
2110
MemberResolutionResult
<TMember> m1,
2111
MemberResolutionResult
<TMember> m2,
2574
private static bool RequiredFunctionType<TMember>(
MemberResolutionResult
<TMember> m)
2595
MemberResolutionResult
<TMember> m1,
2597
MemberResolutionResult
<TMember> m2,
2658
private static void GetParameterCounts<TMember>(
MemberResolutionResult
<TMember> m, ArrayBuilder<BoundExpression> arguments, out int declaredParameterCount, out int parametersUsedIncludingExpansionAndOptional) where TMember : Symbol
4001
private
MemberResolutionResult
<TMember> IsMemberApplicableInNormalForm<TMember>(
4056
var
applicableResult = IsApplicable(
4079
private
MemberResolutionResult
<TMember> IsMemberApplicableInExpandedForm<TMember>(
4125
var
result = IsApplicable(
4142
private
MemberResolutionResult
<TMember> IsApplicable<TMember>(
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (49)
28
private
MemberResolutionResult
<TMember> _bestResult;
30
internal readonly ArrayBuilder<
MemberResolutionResult
<TMember>> ResultsBuilder;
35
this.ResultsBuilder = new ArrayBuilder<
MemberResolutionResult
<TMember>>();
40
_bestResult = default(
MemberResolutionResult
<TMember>);
62
public
MemberResolutionResult
<TMember> ValidResult
87
public
MemberResolutionResult
<TMember> BestResult
102
public ImmutableArray<
MemberResolutionResult
<TMember>> Results
148
private static ThreeState TryGetBestResult(ArrayBuilder<
MemberResolutionResult
<TMember>> allResults, out
MemberResolutionResult
<TMember> best)
150
best = default(
MemberResolutionResult
<TMember>);
160
best = default(
MemberResolutionResult
<TMember>);
376
MemberResolutionResult
<TMember> firstSupported = default(
MemberResolutionResult
<TMember>);
377
MemberResolutionResult
<TMember> firstUnsupported = default(
MemberResolutionResult
<TMember>);
379
var supportedInPriorityOrder = new
MemberResolutionResult
<TMember>[7]; // from highest to lowest priority
388
foreach (
MemberResolutionResult
<TMember> result in this.ResultsBuilder)
461
foreach (
var
supported in supportedInPriorityOrder)
580
private static void ReportUnsupportedMetadata(Location location, BindingDiagnosticBag diagnostics, ImmutableArray<Symbol> symbols,
MemberResolutionResult
<TMember> firstUnsupported)
595
private static void ReportWrongCallingConvention(Location location, BindingDiagnosticBag diagnostics, ImmutableArray<Symbol> symbols,
MemberResolutionResult
<TMember> firstSupported, MethodSymbol target)
606
var
bad = GetFirstMemberKind(MemberResolutionKind.UseSiteError);
625
var
inaccessible = GetFirstMemberKind(MemberResolutionKind.InaccessibleTypeArgument);
648
var
staticInstanceMismatch = GetFirstMemberKind(MemberResolutionKind.StaticInstanceMismatch);
699
var
mismatch = GetFirstMemberKind(MemberResolutionKind.WrongRefKind);
720
var
constraintFailure = GetFirstMemberKind(MemberResolutionKind.ConstraintFailure);
746
var
inferenceFailed = GetFirstMemberKind(MemberResolutionKind.TypeInferenceFailed);
790
MemberResolutionResult
<TMember> bad,
810
MemberResolutionResult
<TMember> bad,
829
private static void ReportDuplicateNamedArgument(
MemberResolutionResult
<TMember> result, BindingDiagnosticBag diagnostics, AnalyzedArguments arguments)
841
MemberResolutionResult
<TMember> bad,
878
MemberResolutionResult
<TMember> bad,
1032
var
result = GetFirstMemberKind(MemberResolutionKind.ConstructedParameterFailedConstraintCheck);
1090
var
badArg = GetFirstMemberKind(MemberResolutionKind.BadArgumentConversion);
1155
MemberResolutionResult
<TMember> badArg,
1377
static Symbol unwrapIfParamsCollection(
MemberResolutionResult
<TMember> badArg, ParameterSymbol parameter, bool isLastParameter)
1391
MemberResolutionResult
<TMember> worseResult1;
1392
MemberResolutionResult
<TMember> worseResult2;
1424
private int TryGetFirstTwoWorseResults(out
MemberResolutionResult
<TMember> first, out
MemberResolutionResult
<TMember> second)
1429
first = default(
MemberResolutionResult
<TMember>);
1430
second = default(
MemberResolutionResult
<TMember>);
1455
MemberResolutionResult
<TMember> validResult1;
1456
MemberResolutionResult
<TMember> validResult2;
1476
private int TryGetFirstTwoValidResults(out
MemberResolutionResult
<TMember> first, out
MemberResolutionResult
<TMember> second)
1481
first = default(
MemberResolutionResult
<TMember>);
1482
second = default(
MemberResolutionResult
<TMember>);
1533
private
MemberResolutionResult
<TMember> GetFirstMemberKind(MemberResolutionKind kind)
1543
return default(
MemberResolutionResult
<TMember>);