21 instantiations of MemberAnalysisResult
Microsoft.CodeAnalysis.CSharp (21)
Binder\Semantics\OverloadResolution\MemberAnalysisResult.cs (21)
264
return new
MemberAnalysisResult
(
271
return new
MemberAnalysisResult
(
278
return new
MemberAnalysisResult
(
285
return new
MemberAnalysisResult
(
292
return new
MemberAnalysisResult
(
306
return new
MemberAnalysisResult
(
313
return new
MemberAnalysisResult
(MemberResolutionKind.UseSiteError);
318
return new
MemberAnalysisResult
(MemberResolutionKind.UnsupportedMetadata);
325
return new
MemberAnalysisResult
(
336
return new
MemberAnalysisResult
(MemberResolutionKind.InaccessibleTypeArgument);
341
return new
MemberAnalysisResult
(MemberResolutionKind.TypeInferenceFailed);
346
return new
MemberAnalysisResult
(MemberResolutionKind.TypeInferenceExtensionInstanceArgument);
351
return new
MemberAnalysisResult
(MemberResolutionKind.StaticInstanceMismatch);
356
return new
MemberAnalysisResult
(
363
return new
MemberAnalysisResult
(MemberResolutionKind.WrongRefKind);
368
return new
MemberAnalysisResult
(MemberResolutionKind.WrongReturnType);
373
return new
MemberAnalysisResult
(MemberResolutionKind.LessDerived);
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);
81 references to MemberAnalysisResult
Microsoft.CodeAnalysis.CSharp (81)
Binder\Binder_Expressions.cs (6)
3385
var
result = methodResult.Result;
3512
var
result = methodResult.Result;
3566
var
result = methodResult.Result;
3608
var
result = methodResult.Result;
3677
static ParameterSymbol getCorrespondingParameter(in
MemberAnalysisResult
result, ImmutableArray<ParameterSymbol> parameters, int arg)
3688
in
MemberAnalysisResult
memberAnalysisResult,
Binder\Semantics\OverloadResolution\MemberAnalysisResult.cs (24)
241
public static
MemberAnalysisResult
ArgumentParameterMismatch(ArgumentAnalysisResult argAnalysis)
262
public static
MemberAnalysisResult
NameUsedForPositional(int argumentPosition)
269
public static
MemberAnalysisResult
BadNonTrailingNamedArgument(int argumentPosition)
276
public static
MemberAnalysisResult
NoCorrespondingParameter(int argumentPosition)
283
public static
MemberAnalysisResult
NoCorrespondingNamedParameter(int argumentPosition)
290
public static
MemberAnalysisResult
DuplicateNamedArgument(int argumentPosition)
304
public static
MemberAnalysisResult
RequiredParameterMissing(int parameterPosition)
311
public static
MemberAnalysisResult
UseSiteError()
316
public static
MemberAnalysisResult
UnsupportedMetadata()
321
public static
MemberAnalysisResult
BadArgumentConversions(ImmutableArray<int> argsToParamsOpt, BitVector badArguments, ImmutableArray<Conversion> conversions, TypeWithAnnotations definitionParamsElementTypeOpt, TypeWithAnnotations paramsElementTypeOpt)
334
public static
MemberAnalysisResult
InaccessibleTypeArgument()
339
public static
MemberAnalysisResult
TypeInferenceFailed()
344
public static
MemberAnalysisResult
TypeInferenceExtensionInstanceArgumentFailed()
349
public static
MemberAnalysisResult
StaticInstanceMismatch()
354
public static
MemberAnalysisResult
ConstructedParameterFailedConstraintsCheck(int parameterPosition)
361
public static
MemberAnalysisResult
WrongRefKind()
366
public static
MemberAnalysisResult
WrongReturnType()
371
public static
MemberAnalysisResult
LessDerived()
376
public static
MemberAnalysisResult
NormalForm(ImmutableArray<int> argsToParamsOpt, ImmutableArray<Conversion> conversions, bool hasAnyRefOmittedArgument)
381
public static
MemberAnalysisResult
ExpandedForm(ImmutableArray<int> argsToParamsOpt, ImmutableArray<Conversion> conversions, bool hasAnyRefOmittedArgument, TypeWithAnnotations definitionParamsElementType, TypeWithAnnotations paramsElementType)
388
public static
MemberAnalysisResult
Worse()
393
public static
MemberAnalysisResult
Worst()
398
internal static
MemberAnalysisResult
ConstraintFailure(ImmutableArray<TypeParameterDiagnosticInfo> constraintFailureDiagnostics)
403
internal static
MemberAnalysisResult
WrongCallingConvention()
Binder\Semantics\OverloadResolution\MemberResolutionResult.cs (6)
19
private readonly
MemberAnalysisResult
_result;
26
internal MemberResolutionResult(TMember member, TMember leastOverriddenMember,
MemberAnalysisResult
result, bool hasTypeArgumentInferredFromFunctionType)
34
internal MemberResolutionResult<TMember> WithResult(
MemberAnalysisResult
result)
101
return WithResult(
MemberAnalysisResult
.Worse());
106
return WithResult(
MemberAnalysisResult
.Worst());
120
internal
MemberAnalysisResult
Result
Binder\Semantics\OverloadResolution\OverloadResolution.cs (45)
532
results[f] = result.WithResult(
MemberAnalysisResult
.LessDerived());
617
results[f] = result.WithResult(
MemberAnalysisResult
.StaticInstanceMismatch());
633
results[f] = result.WithResult(
MemberAnalysisResult
.StaticInstanceMismatch());
659
MemberAnalysisResult
.ConstraintFailure(constraintFailureDiagnosticsOpt.ToImmutableAndFree()));
790
=> result.WithResult(
MemberAnalysisResult
.WrongCallingConvention());
880
results[f] = result.WithResult(
MemberAnalysisResult
.WrongReturnType());
884
results[f] = result.WithResult(
MemberAnalysisResult
.WrongRefKind());
925
Debug.Assert(!
MemberAnalysisResult
.UnsupportedMetadata().HasUseSiteDiagnosticToReportFor(constructor));
928
results.Add(new MemberResolutionResult<MethodSymbol>(constructor, constructor,
MemberAnalysisResult
.UnsupportedMetadata(), hasTypeArgumentInferredFromFunctionType: false));
933
var
normalResult = IsConstructorApplicableInNormalForm(constructor, arguments, completeResults, ref useSiteInfo);
934
var
result = normalResult;
939
var
expandedResult = IsConstructorApplicableInExpandedForm(constructor, arguments, definitionElementType, completeResults, ref useSiteInfo);
954
private
MemberAnalysisResult
IsConstructorApplicableInNormalForm(
963
return
MemberAnalysisResult
.ArgumentParameterMismatch(argumentAnalysis);
969
return
MemberAnalysisResult
.UseSiteError();
997
private
MemberAnalysisResult
IsConstructorApplicableInExpandedForm(
1007
return
MemberAnalysisResult
.ArgumentParameterMismatch(argumentAnalysis);
1013
return
MemberAnalysisResult
.UseSiteError();
1026
var
result = IsApplicable(
1144
Debug.Assert(!
MemberAnalysisResult
.UnsupportedMetadata().HasUseSiteDiagnosticToReportFor(member));
1147
results.Add(new MemberResolutionResult<TMember>(member, leastOverriddenMember,
MemberAnalysisResult
.UnsupportedMetadata(), hasTypeArgumentInferredFromFunctionType: false));
1467
results[f] = result.WithResult(
MemberAnalysisResult
.InaccessibleTypeArgument());
1598
results[f] = result.WithResult(
MemberAnalysisResult
.LessDerived());
1714
results[f] = result.WithResult(
MemberAnalysisResult
.LessDerived());
2071
private static ParameterSymbol GetParameter(int argIndex,
MemberAnalysisResult
result, ImmutableArray<ParameterSymbol> parameters)
2558
static TypeSymbol getParameterTypeAndRefKind(int i,
MemberAnalysisResult
result, ImmutableArray<ParameterSymbol> parameters, TypeWithAnnotations paramsElementTypeOpt, out RefKind parameter1RefKind)
4050
return new MemberResolutionResult<TMember>(member, leastOverriddenMember,
MemberAnalysisResult
.ArgumentParameterMismatch(argumentAnalysis), hasTypeArgumentInferredFromFunctionType: false);
4058
return new MemberResolutionResult<TMember>(member, leastOverriddenMember,
MemberAnalysisResult
.UseSiteError(), hasTypeArgumentInferredFromFunctionType: false);
4094
return new MemberResolutionResult<TMember>(member, leastOverriddenMember,
MemberAnalysisResult
.ArgumentParameterMismatch(argumentAnalysis), hasTypeArgumentInferredFromFunctionType: false);
4120
return new MemberResolutionResult<TMember>(member, leastOverriddenMember,
MemberAnalysisResult
.ArgumentParameterMismatch(argumentAnalysis), hasTypeArgumentInferredFromFunctionType: false);
4127
return new MemberResolutionResult<TMember>(member, leastOverriddenMember,
MemberAnalysisResult
.UseSiteError(), hasTypeArgumentInferredFromFunctionType: false);
4217
MemberAnalysisResult
inferenceError;
4267
return new MemberResolutionResult<TMember>(member, leastOverriddenMember,
MemberAnalysisResult
.ConstructedParameterFailedConstraintsCheck(i), hasTypeArgumentsInferredFromFunctionType);
4287
var
applicableResult = IsApplicable(
4310
out
MemberAnalysisResult
error,
4333
error = default(
MemberAnalysisResult
);
4349
error =
MemberAnalysisResult
.TypeInferenceExtensionInstanceArgumentFailed();
4355
error =
MemberAnalysisResult
.TypeInferenceFailed();
4359
private
MemberAnalysisResult
IsApplicable(
4503
return
MemberAnalysisResult
.BadArgumentConversions(argsToParameters,
MemberAnalysisResult
.CreateBadArgumentsWithPosition(argumentPosition), ImmutableArray.Create(conversion),
4535
MemberAnalysisResult
result;
4539
result =
MemberAnalysisResult
.BadArgumentConversions(argsToParameters, badArguments, conversionsArray,
4546
result =
MemberAnalysisResult
.ExpandedForm(argsToParameters, conversionsArray, hasAnyRefOmittedArgument,
4552
result =
MemberAnalysisResult
.NormalForm(argsToParameters, conversionsArray, hasAnyRefOmittedArgument);