/// <remarks> /// NOTE: This method is intended for passes other than the LocalRewriter. /// NOTE: Use MakeConversion helper method in the LocalRewriter instead, /// NOTE: it generates a synthesized conversion in its lowered form. /// </remarks> public static BoundConversion Synthesized( SyntaxNode syntax, BoundExpression operand, Conversion conversion, bool @checked, bool explicitCastInCode, ConversionGroup conversionGroupOpt, ConstantValue constantValueOpt, TypeSymbol type, bool hasErrors = false) { return(new BoundConversion( syntax, operand, conversion, @checked, explicitCastInCode: explicitCastInCode, conversionGroupOpt, constantValueOpt, type, hasErrors || !conversion.IsValid) { WasCompilerGenerated = true }); }
public BoundConversion( SyntaxNode syntax, BoundExpression operand, Conversion conversion, bool @checked, bool explicitCastInCode, ConversionGroup conversionGroupOpt, ConstantValue constantValueOpt, TypeSymbol type, bool hasErrors = false) : this( syntax, operand, conversion, isBaseConversion : false, @checked : @checked, explicitCastInCode : explicitCastInCode, constantValueOpt : constantValueOpt, conversionGroupOpt, type : type, hasErrors : hasErrors || !conversion.IsValid) { OriginalUserDefinedConversionsOpt = conversion.OriginalUserDefinedConversions; }