91 references to Conversions
Microsoft.CodeAnalysis.CSharp (91)
Binder\Binder_Await.cs (1)
416
var conversion = this.
Conversions
.ClassifyImplicitConversionFromType(awaiterType, INotifyCompletion, ref useSiteInfo);
Binder\Binder_Conversions.cs (2)
26
var conversion =
Conversions
.ClassifyConversionFromExpression(source, destination, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
539
.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(Compilation,
Conversions
, includeNullability: false, syntax.Location, diagnostics));
Binder\Binder_Deconstruct.cs (1)
323
nestedConversion = this.
Conversions
.ClassifyConversionFromType(tupleOrDeconstructedTypes[i], single.Type, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
Binder\Binder_Expressions.cs (18)
1222
Conversion conversion = this.
Conversions
.ClassifyConversionFromExpression(argument, typedReferenceType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
1271
Conversion conversion = this.
Conversions
.ClassifyConversionFromExpression(argument, typedReferenceType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
2581
Conversion conversion = this.
Conversions
.ClassifyImplicitConversionFromExpression(boundOperand, intType, ref useSiteInfo);
2687
Conversion conversion = this.
Conversions
.ClassifyImplicitConversionFromExpression(boundOperand, indexType, ref useSiteInfo);
2702
Conversion conversion = this.
Conversions
.ClassifyConversionFromExpression(operand, targetType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo, forCast: true);
2860
var elementConversion =
Conversions
.ClassifyConversionFromExpression(argument, targetElementType, isChecked: CheckOverflowAtRuntime, ref discardedUseSiteInfo);
2886
var underlyingConversion =
Conversions
.ClassifyBuiltInConversion(operand.Type, underlyingTargetTypeWithAnnotations.Type, isChecked: CheckOverflowAtRuntime, ref discardedUseSiteInfo);
4068
TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.
Conversions
, ref useSiteInfo, out _);
4095
TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.
Conversions
, ref useSiteInfo, out _);
5246
var conversion = @this.
Conversions
.ClassifyConversionFromExpression(expression, collectionType, isChecked: @this.CheckOverflowAtRuntime, ref useSiteInfo);
5338
var conversion = this.
Conversions
.ClassifyConversionFromExpression(unboundLambda, type, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
5411
Conversion conv =
Conversions
.MethodGroupConversion(argument.Syntax, methodGroup, type, ref useSiteInfo);
6255
var result =
Conversions
.HasImplicitConversionToOrImplementsVarianceCompatibleInterface(initializerType, collectionsIEnumerableType, ref useSiteInfo, out bool needSupportForRefStructInterfaces);
6949
Conversion conversion = this.
Conversions
.ClassifyConversionFromExpression(classCreation, interfaceType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo, forCast: true);
9444
Conversion failedConversion = this.
Conversions
.ClassifyConversionFromExpression(index, int32, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
9499
Conversion conversion = this.
Conversions
.ClassifyImplicitConversionFromExpression(expr, targetType, ref useSiteInfo);
10776
new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.
Conversions
, includeNullability: false, location: NoLocation.Singleton, diagnostics: null),
10853
if (checkConstraints(Compilation,
Conversions
, delegateType, typeArguments))
Binder\Binder_Invocation.cs (4)
998
(typeArgumentsOpt.IsDefault || ((MethodSymbol)(object)result.Member).CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.
Conversions
, includeNullability: false, syntax.Location, candidateDiagnostics))))
1642
&&
Conversions
.ClassifyBuiltInConversion(Compilation.GetSpecialType(SpecialType.System_String), parameterType, isChecked: false, ref discardedUseSiteInfo).Exists
1680
Conversion conversion =
Conversions
.ClassifyConversionFromExpression(defaultValue, parameterType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
1743
Conversion conversion =
Conversions
.ClassifyImplicitConversionFromExpression(unconvertedCollection, collectionType, ref useSiteInfo);
Binder\Binder_Operators.cs (18)
223
Conversion rightToLeftConversion = this.
Conversions
.ClassifyConversionFromExpression(right, leftType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
270
Conversion argumentConversion = this.
Conversions
.ClassifyConversionFromExpression(right, delegateType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
747
foundOperator = !isObjectEquality || BuiltInOperators.IsValidObjectEquality(
Conversions
, leftType, leftNull, leftDefault, rightType, rightNull, rightDefault, ref useSiteInfo);
820
var conversion = this.
Conversions
.ClassifyConversionFromExpression(right, left.Type, isChecked: CheckOverflowAtRuntime, ref discardedUseSiteInfo);
1068
var implicitConversion =
Conversions
.ClassifyImplicitConversionFromExpression(left, booleanType, ref useSiteInfo);
1276
var conversion = this.
Conversions
.ClassifyConversionFromType(argumentType, op.GetParameterType(0), isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
3306
Conversion conv =
Conversions
.ClassifyConversionFromExpression(operand, targetType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
3328
Conversion conversion =
Conversions
.ClassifyBuiltInConversion(operandType, targetType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
3824
Conversion conversion =
Conversions
.ClassifyBuiltInConversion(operandType, targetType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
4051
Conversions
.ClassifyConversionFromExpression(leftOperand, objectType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo),
4067
var rightConversion =
Conversions
.ClassifyImplicitConversionFromExpression(rightOperand, optLeftType0, ref useSiteInfo);
4085
var rightConversion =
Conversions
.ClassifyImplicitConversionFromExpression(rightOperand, optLeftType, ref useSiteInfo);
4134
leftConversionClassification =
Conversions
.ClassifyImplicitConversionFromType(optLeftType0, optRightType, ref useSiteInfo);
4148
leftConversionClassification =
Conversions
.ClassifyImplicitConversionFromExpression(leftOperand, optRightType, ref useSiteInfo);
4202
var underlyingRightConversion =
Conversions
.ClassifyImplicitConversionFromExpression(rightOperand, underlyingLeftType, ref useSiteInfo);
4216
var rightConversion =
Conversions
.ClassifyImplicitConversionFromExpression(rightOperand, leftType, ref useSiteInfo);
4304
TypeSymbol? bestType = BestTypeInferrer.InferBestTypeForConditionalOperator(trueExpr, falseExpr, this.
Conversions
, out bool hadMultipleCandidates, ref useSiteInfo);
4359
type = BestTypeInferrer.InferBestTypeForConditionalOperator(trueExpr, falseExpr, this.
Conversions
, hadMultipleCandidates: out _, ref useSiteInfo);
Binder\Binder_Patterns.cs (5)
620
ConstantValue match = ExpressionOfTypeMatchesPatternType(
Conversions
, inputType, expression.Type, ref useSiteInfo, out _, operandConstantValue: null);
631
patternExpressionConversion = this.
Conversions
.ClassifyConversionFromExpression(expression, inputType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
766
Conversions
, inputType, patternType, ref useSiteInfo, out Conversion conversion, operandConstantValue: null, operandCouldBeNull: true);
1835
else if (binder.
Conversions
.HasImplicitReferenceConversion(bestSoFar, possiblyLessSpecificCandidate, ref useSiteInfo))
1840
else if (binder.
Conversions
.HasBoxingConversion(bestSoFar, possiblyLessSpecificCandidate, ref useSiteInfo))
Binder\Binder_Statements.cs (11)
1367
Conversion elementConversionClassification = this.
Conversions
.ClassifyConversionFromType(pointerType, declType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
1944
this.
Conversions
.ClassifyConversionFromExpression(expression, targetType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo) :
1945
this.
Conversions
.ClassifyConversionFromType(expression.Type, targetType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
2046
if (
Conversions
.IsValidFunctionTypeConversionTarget(targetType, ref discardedUseSiteInfo))
2424
var conversion = this.
Conversions
.ClassifyImplicitConversionFromExpression(expr, targetType, ref useSiteInfo);
2486
else if (
Conversions
.IsValidFunctionTypeConversionTarget(targetType, ref discardedUseSiteInfo) &&
2524
var elementConversion =
Conversions
.ClassifyImplicitConversionFromExpression(argument, targetElementType, ref discardedUseSiteInfo);
2672
var conversion = this.
Conversions
.ClassifyConversionFromExpression(expr, boolean, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
3150
conversion = this.
Conversions
.ClassifyConversionFromExpression(argument, returnType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
3155
conversion = this.
Conversions
.ClassifyConversionFromExpression(argument, returnType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
3302
if (
Conversions
.HasIdentityOrImplicitReferenceConversion(type, previousType, ref useSiteInfo))
Binder\Binder_Symbols.cs (2)
557
type.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.
Conversions
, includeNullability: true, location, diagnostics));
1564
type.CheckConstraintsForNamedType(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.
Conversions
, includeNullability, typeSyntax.Location, diagnostics),
Binder\Binder_TupleOperators.cs (1)
132
Conversion conversion = this.
Conversions
.ClassifyImplicitConversionFromType(type, boolean, ref useSiteInfo);
Binder\ForEachLoopBinder.cs (6)
469
Conversion elementConversionClassification = this.
Conversions
.ClassifyConversionFromType(inferredType.Type, iterationVariableType.Type, isChecked: CheckOverflowAtRuntime, ref useSiteInfo, forCast: true);
523
Conversion collectionConversionClassification = this.
Conversions
.ClassifyConversionFromExpression(collectionExpr, builder.CollectionType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
524
Conversion currentConversionClassification = this.
Conversions
.ClassifyConversionFromType(builder.CurrentPropertyGetter.ReturnType, builder.ElementType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
1261
bool result = this.
Conversions
.HasImplicitConversionToOrImplementsVarianceCompatibleInterface(enumeratorType,
1529
var collectionConversion = this.
Conversions
.ClassifyConversionFromExpression(collectionExpr, result.Parameters[0].Type, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
1769
this.
Conversions
.HasImplicitConversionToOrImplementsVarianceCompatibleInterface(type, implementedNonGeneric, ref useSiteInfo, out needSupportForRefStructInterfaces))
Binder\Semantics\OverloadResolution\OverloadResolution.cs (3)
45
get { return _binder.
Conversions
; }
4301
_binder.
Conversions
,
4320
_binder.
Conversions
,
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
323
if (HadConstructedParameterFailedConstraintCheck(binder.
Conversions
, binder.Compilation, diagnostics, location))
Binder\SwitchBinder.cs (2)
257
Conversion conversion =
Conversions
.ClassifyConversionFromExpression(caseExpression, SwitchGoverningType, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
412
Conversion conversion = binder.
Conversions
.ClassifyImplicitUserDefinedConversionForV6SwitchGoverningType(switchGoverningType, out resultantGoverningType, ref useSiteInfo);
Binder\SwitchExpressionBinder.cs (2)
154
var commonType = BestTypeInferrer.GetBestType(typesInOrder,
Conversions
, ref useSiteInfo);
163
if (!this.
Conversions
.ClassifyImplicitConversionFromExpression(@case.Value, commonType, ref useSiteInfo).Exists)
Binder\UsingStatementBinder.cs (1)
271
var conversions = originalBinder.
Conversions
;
BoundTree\UnboundLambda.cs (2)
727
Binder.
Conversions
);
956
inferredReturnType = BoundLambda.InferReturnType(returnTypes, _unboundLambda, lambdaBodyBinder, delegateType, lambdaSymbol.IsAsync, lambdaBodyBinder.
Conversions
);
Compilation\CSharpCompilation.cs (1)
87
Interlocked.CompareExchange(ref _conversions, new BuckStopsHereBinder(this, associatedFileIdentifier: null).
Conversions
, null);
Compilation\CSharpSemanticModel.cs (3)
2210
conversion = binder.
Conversions
.ClassifyConversionFromExpression(boundExpr, convertedType, isChecked: ((BoundConversion)highestBoundExpr).Checked, ref discardedUseSiteInfo);
2860
return binder.
Conversions
.ClassifyConversionFromExpression(bnode, cdestination, isChecked: binder.CheckOverflowAtRuntime, ref discardedUseSiteInfo);
2912
return binder.
Conversions
.ClassifyConversionFromExpression(bnode, destination, isChecked: binder.CheckOverflowAtRuntime, ref discardedUseSiteInfo, forCast: true);
Compilation\MemberSemanticModel.cs (2)
483
return binder.
Conversions
.ClassifyConversionFromExpression(boundExpression, csdestination, isChecked: binder.CheckOverflowAtRuntime, ref discardedUseSiteInfo);
507
return binder.
Conversions
.ClassifyConversionFromExpression(boundExpression, destination, isChecked: binder.CheckOverflowAtRuntime, ref discardedUseSiteInfo, forCast: true);
FlowAnalysis\NullableWalker.cs (4)
1382
var conversions = binder.
Conversions
;
1523
binder.
Conversions
,
1582
binder.
Conversions
,
1663
binder.
Conversions
,
Symbols\Source\ParameterHelpers.cs (1)
737
Conversion conversion = binder.
Conversions
.ClassifyImplicitConversionFromExpression(defaultExpression, parameterType, ref useSiteInfo);