3 instantiations of Conversions
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder.cs (1)
508Interlocked.CompareExchange(ref _lazyConversions, new Conversions(this), null);
Binder\Semantics\Conversions\Conversions.cs (2)
32return new Conversions(_binder, currentRecursionDepth, IncludeNullability, otherNullabilityOpt: null); 41return new Conversions(_binder, currentRecursionDepth, includeNullability, this);
65 references to Conversions
Microsoft.CodeAnalysis.CSharp (64)
Binder\Binder.cs (3)
38internal Binder(Binder next, Conversions? conversions = null) 501private Conversions? _lazyConversions; 502internal Conversions Conversions
Binder\Binder_Expressions.cs (1)
5421if (!Conversions.ReportDelegateOrFunctionPointerMethodGroupDiagnostics(this, boundMethodGroup, type, diagnostics))
Binder\Binder_Operators.cs (4)
3614if (Conversions.HasIdentityConversion(operandType.GetNullableUnderlyingType(), targetType)) 4348if (!Conversions.HasIdentityConversion(trueType, falseType)) 4363Debug.Assert(Conversions.HasIdentityConversion(trueType, type)); 4364Debug.Assert(Conversions.HasIdentityConversion(falseType, type));
Binder\Binder_Patterns.cs (1)
803Conversions conversions,
Binder\Binder_Statements.cs (2)
2020var reason = Conversions.IsAnonymousFunctionCompatibleWithType(anonymousFunction, targetType, this.Compilation); 2444if (!Conversions.ReportDelegateOrFunctionPointerMethodGroupDiagnostics(this, methodGroup, targetType, diagnostics))
Binder\DecisionDagBuilder.cs (1)
59private readonly Conversions _conversions;
Binder\Semantics\BestTypeInferrer.cs (2)
119Conversions conversions, 135var conversionsWithoutNullability = conversions.WithNullability(false);
Binder\Semantics\Conversions\Conversions.cs (3)
24private Conversions(Binder binder, int currentRecursionDepth, bool includeNullability, Conversions otherNullabilityOpt) 521internal new Conversions WithNullability(bool includeNullability) 523return (Conversions)base.WithNullability(includeNullability);
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (2)
314Conversion leftConversion = Conversions.FastClassifyConversion(leftType, signature.LeftType); 315Conversion rightConversion = Conversions.FastClassifyConversion(rightType, signature.RightType);
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (6)
443if (!(useIdentityConversion ? Conversions.HasIdentityConversion(leftType, rightType) : leftType.Equals(rightType))) 667if ((object)rightType != null && ((object)leftType == null || !(useIdentityConversion ? Conversions.HasIdentityConversion(rightType, leftType) : rightType.Equals(leftType)))) 694if ((object)rightType != null && ((object)leftType == null || !Conversions.HasIdentityConversion(rightType, leftType))) 763static bool useOnlyReferenceEquality(Conversions conversions, BoundExpression left, BoundExpression right, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1228if (Conversions.HasIdentityConversion(op1.LeftType, op2.LeftType) && 1229Conversions.HasIdentityConversion(op1.RightType, op2.RightType))
Binder\Semantics\Operators\UnaryOperatorEasyOut.cs (1)
114Conversion? conversion = Conversions.FastClassifyConversion(operandType, signature.OperandType);
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
201if (Conversions.HasIdentityConversion(op1.OperandType, op2.OperandType))
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (1)
1485Conversions.GetDelegateOrFunctionPointerArguments(source.Syntax, analyzedArguments, delegateParameters, binder.Compilation);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (13)
43private Conversions Conversions 2544if (!Conversions.HasIdentityConversion(t1, t2)) 2892if (Conversions.HasIdentityConversion(t1, t2)) 3086if (!Conversions.HasIdentityConversion(elementType1, elementType2)) 3155Debug.Assert(!Conversions.HasIdentityConversion(t1, t2)); 3231if ((object)node.Type != null && Conversions.HasIdentityConversion(node.Type, t)) 3261if (x.HasType && Conversions.HasIdentityConversion(x.Type, y)) 3451if (Conversions.HasIdentityConversion(type1, type2)) 3649Debug.Assert(!Conversions.HasIdentityConversion(r1, r2)); 3669if (Conversions.HasIdentityConversion(r1, r2)) 3723if (!Conversions.HasIdentityConversion(param1.Type, param2.Type)) 4493if (forExtensionMethodThisArg && !conversion.IsDynamic && !Conversions.IsValidExtensionMethodThisArgConversion(conversion)) 4625if ((object)argType != null && Conversions.HasIdentityConversion(argType, parameterType))
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
1221Conversions.ReportDelegateOrFunctionPointerMethodGroupDiagnostics(binder, (BoundMethodGroup)argument, parameterType, diagnostics)) 1230Conversions.ReportDelegateOrFunctionPointerMethodGroupDiagnostics(binder, ((BoundUnconvertedAddressOfOperator)argument).Operand, parameterType, diagnostics))
Binder\UsingStatementBinder.cs (1)
271var conversions = originalBinder.Conversions;
BoundTree\UnboundLambda.cs (2)
150(Conversions)conversions, 285bestResultType = NullableWalker.BestTypeForLambdaReturns(returns, binder, node, (Conversions)conversions, out inferredFromFunctionType);
Compilation\BuiltInOperators.cs (1)
855internal static bool IsValidObjectEquality(Conversions Conversions, TypeSymbol leftType, bool leftIsNull, bool leftIsDefault, TypeSymbol rightType, bool rightIsNull, bool rightIsDefault, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Compilation\CSharpCompilation.cs (2)
77private Conversions? _conversions; 81internal Conversions Conversions
FlowAnalysis\NullableWalker.cs (12)
175private readonly Conversions _conversions; 456Conversions conversions, 470_conversions = (Conversions)conversions.WithNullability(true); 1382var conversions = binder.Conversions; 1682Conversions conversions, 1722Conversions conversions, 2007var conversionsWithoutNullability = this.compilation.Conversions; 2614var conversionsWithoutNullability = _conversions.WithNullability(false); 2720var conversionsWithoutNullability = _conversions.WithNullability(false); 4702Conversions conversions, 4739Conversions conversionsWithoutNullability = walker._conversions.WithNullability(false); 8090private Conversion GenerateConversion(Conversions conversions, BoundExpression? sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool fromExplicitCast, bool extensionMethodThisArgument, bool isChecked)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
1257var conversions = compilation.Conversions.WithNullability(true); 1543var conversions = compilation.Conversions.WithNullability(true);
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1879Conversions.HasIdentityConversion(((NamedTypeSymbol)returnTypeOriginalDefinition).Construct(ImmutableArray.Create(elementType)), returnType))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\ConversionTests.cs (1)
315var conv = new BuckStopsHereBinder(compilation, associatedFileIdentifier: null).Conversions;