24 references to Conversions
Microsoft.CodeAnalysis.CSharp (24)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (6)
383
if (
Conversions
.ClassifyImplicitConversionFromExpression(left, systemDelegateType, ref useSiteInfo).IsValid &&
384
Conversions
.ClassifyImplicitConversionFromExpression(right, systemDelegateType, ref useSiteInfo).IsValid)
713
if (isEquality && useOnlyReferenceEquality(
Conversions
, left, right, ref useSiteInfo))
779
return (operand.Type is TypeParameterSymbol { AllowsRefLikeType: true }) ? Conversion.Boxing :
Conversions
.ClassifyConversionFromExpression(operand, objectType, isChecked: isChecked, ref useSiteInfo);
800
var convLeft =
Conversions
.ClassifyConversionFromExpression(left, op.LeftType, isChecked: isChecked, ref useSiteInfo);
801
var convRight =
Conversions
.ClassifyConversionFromExpression(right, op.RightType, isChecked: isChecked, ref useSiteInfo);
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
277
var conversion =
Conversions
.ClassifyConversionFromExpression(operand, op.OperandType, isChecked: isChecked, ref useSiteInfo);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (17)
806
new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.
Conversions
, includeNullability: false, location: NoLocation.Singleton, diagnostics: null, template),
866
returnsMatch =
Conversions
.HasIdentityOrImplicitReferenceConversion(method.ReturnType, returnType, ref useSiteInfo);
870
||
Conversions
.HasImplicitPointerConversion(method.ReturnType, returnType, ref useSiteInfo);
2199
if (allSame &&
Conversions
.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity)
2208
if (
Conversions
.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity)
2321
if (
Conversions
.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity)
2824
Conversions
.ClassifyImplicitConversionFromExpression(node, t1, ref useSiteInfo),
2826
Conversions
.ClassifyImplicitConversionFromExpression(node, t2, ref useSiteInfo),
3063
var t1IsConvertibleToT2 =
Conversions
.ClassifyImplicitConversionFromType(t1, t2, ref useSiteInfo).IsImplicit;
3064
var t2IsConvertibleToT1 =
Conversions
.ClassifyImplicitConversionFromType(t2, t1, ref useSiteInfo).IsImplicit;
3183
Conversions
.ClassifyImplicitConversionFromType(source, destination, ref useSiteInfo).IsImplicit;
3459
bool type1ToType2 =
Conversions
.ClassifyImplicitConversionFromType(type1, type2, ref useSiteInfo).IsImplicit;
3460
bool type2ToType1 =
Conversions
.ClassifyImplicitConversionFromType(type2, type1, ref useSiteInfo).IsImplicit;
3674
var x = lambda.InferReturnType(
Conversions
, d1, ref useSiteInfo, out _);
4265
if (!parameterTypes[i].Type.CheckAllConstraints(Compilation,
Conversions
))
4609
Conversions
.ClassifyImplicitExtensionMethodThisArgConversion(argument, argument.Type, parameterType, ref useSiteInfo, isMethodGroupConversion: isMethodGroupConversion) :
4611
Conversions
.ClassifyImplicitConversionFromExpression(argument, parameterType, ref useSiteInfo) :