public override Conversion IsValid(IType[] parameterTypes, IType returnType, Conversions conversions) { Assert.AreEqual(expectedParameterTypes, parameterTypes); return(conversions.ImplicitConversion(inferredReturnType, returnType)); }
public override Conversion IsValid(IType[] parameterTypes, IType returnType, Conversions conversions) { return(conversions.ImplicitConversion(inferredReturnType, returnType)); }
public OverloadResolution(ICompilation compilation, ResolveResult[] arguments, string[] argumentNames = null, IType[] typeArguments = null, Conversions conversions = null) { if (compilation == null) { throw new ArgumentNullException("compilation"); } if (arguments == null) { throw new ArgumentNullException("arguments"); } if (argumentNames == null) { argumentNames = new string[arguments.Length]; } else if (argumentNames.Length != arguments.Length) { throw new ArgumentException("argumentsNames.Length must be equal to arguments.Length"); } this.compilation = compilation; this.arguments = arguments; this.argumentNames = argumentNames; // keep explicitlyGivenTypeArguments==null when no type arguments were specified if (typeArguments != null && typeArguments.Length > 0) { this.explicitlyGivenTypeArguments = typeArguments; } this.conversions = conversions ?? Conversions.Get(compilation); this.AllowExpandingParams = true; }
public ConstraintValidatingSubstitution(IList <IType> classTypeArguments, IList <IType> methodTypeArguments, OverloadResolution overloadResolution) : base(classTypeArguments, methodTypeArguments) { this.conversions = overloadResolution.conversions; }
public DynamicErasure(Conversions conversions) { this.objectType = conversions.objectType; }