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);
2191
if (allSame &&
Conversions
.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity)
2200
if (
Conversions
.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity)
2313
if (
Conversions
.ClassifyImplicitConversionFromType(type1Normalized, type2Normalized, ref useSiteInfo).Kind != ConversionKind.Identity)
2816
Conversions
.ClassifyImplicitConversionFromExpression(node, t1, ref useSiteInfo),
2818
Conversions
.ClassifyImplicitConversionFromExpression(node, t2, ref useSiteInfo),
3042
var t1IsConvertibleToT2 =
Conversions
.ClassifyImplicitConversionFromType(t1, t2, ref useSiteInfo).IsImplicit;
3043
var t2IsConvertibleToT1 =
Conversions
.ClassifyImplicitConversionFromType(t2, t1, ref useSiteInfo).IsImplicit;
3162
Conversions
.ClassifyImplicitConversionFromType(source, destination, ref useSiteInfo).IsImplicit;
3438
bool type1ToType2 =
Conversions
.ClassifyImplicitConversionFromType(type1, type2, ref useSiteInfo).IsImplicit;
3439
bool type2ToType1 =
Conversions
.ClassifyImplicitConversionFromType(type2, type1, ref useSiteInfo).IsImplicit;
3653
var x = lambda.InferReturnType(
Conversions
, d1, ref useSiteInfo, out _);
4244
if (!parameterTypes[i].Type.CheckAllConstraints(Compilation,
Conversions
))
4588
Conversions
.ClassifyImplicitExtensionMethodThisArgConversion(argument, argument.Type, parameterType, ref useSiteInfo, isMethodGroupConversion: isMethodGroupConversion) :
4590
Conversions
.ClassifyImplicitConversionFromExpression(argument, parameterType, ref useSiteInfo) :