1 write to ExplicitCastInCode
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
2981this.ExplicitCastInCode = explicitCastInCode;
42 references to ExplicitCastInCode
Microsoft.CodeAnalysis.CSharp (42)
Binder\RefSafetyAnalysis.cs (1)
1261inlineArray: node.Expression is not BoundConversion { Conversion.IsIdentity: true, ExplicitCastInCode: false, Operand: BoundExpression operand } ? node.Expression : operand,
BoundTree\BoundConversion.cs (1)
80Debug.Assert(!ExplicitCastInCode);
BoundTree\BoundExpression.cs (1)
488return this.Update(operand: operand, this.Conversion, this.IsBaseConversion, this.Checked, this.ExplicitCastInCode, this.ConstantValueOpt, this.ConversionGroupOpt, this.InConversionGroupFlags, this.Type);
CodeGen\EmitConversion.cs (1)
220if (conversion.ExplicitCastInCode)
FlowAnalysis\NullableWalker.cs (3)
5970if ((node.RightOperand as BoundConversion)?.ExplicitCastInCode != false && 8692Debug.Assert(group != null || !conversion.ExplicitCastInCode); // Explicit conversions should include a group. 10106fromExplicitCast: conversionOpt?.ExplicitCastInCode ?? false,
Generated\BoundNodes.xml.Generated.cs (5)
3006if (operand != this.Operand || conversion != this.Conversion || isBaseConversion != this.IsBaseConversion || @checked != this.Checked || explicitCastInCode != this.ExplicitCastInCode || constantValueOpt != this.ConstantValueOpt || conversionGroupOpt != this.ConversionGroupOpt || inConversionGroupFlags != this.InConversionGroupFlags || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 11354return node.Update(operand, node.Conversion, node.IsBaseConversion, node.Checked, node.ExplicitCastInCode, node.ConstantValueOpt, node.ConversionGroupOpt, node.InConversionGroupFlags, type); 13485updatedNode = node.Update(operand, node.Conversion, node.IsBaseConversion, node.Checked, node.ExplicitCastInCode, node.ConstantValueOpt, node.ConversionGroupOpt, node.InConversionGroupFlags, infoAndType.Type!); 13490updatedNode = node.Update(operand, node.Conversion, node.IsBaseConversion, node.Checked, node.ExplicitCastInCode, node.ConstantValueOpt, node.ConversionGroupOpt, node.InConversionGroupFlags, node.Type); 15835new TreeDumperNode("explicitCastInCode", node.ExplicitCastInCode, null),
Lowering\BoundTreeToDifferentEnclosingContextRewriter.cs (1)
183node.ExplicitCastInCode,
Lowering\ClosureConversion\ClosureConversion.cs (1)
1402if (_inExpressionLambda && conversion.ExplicitCastInCode)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (5)
677if (conversion != null && !conversion.ExplicitCastInCode) 730return node.ExplicitCastInCode ? Convert(operand, node.Type, false) : operand; 735return Convert(Visit(node.Operand), node.Operand.Type, node.Type, node.Checked, node.ExplicitCastInCode); 746return Convert(Constant(_bound.Null(_objectType)), _objectType, node.Type, false, node.ExplicitCastInCode); 748return Convert(Visit(node.Operand), node.Operand.Type, node.Type, node.Checked, node.ExplicitCastInCode);
Lowering\DiagnosticsPass_Warnings.cs (5)
144if (conversion.ExplicitCastInCode) break; 346return node.Kind == BoundKind.Conversion && ((BoundConversion)node).ExplicitCastInCode; 354if (conv.ExplicitCastInCode) return false; 441if (conversion.ExplicitCastInCode) 687if (conv.ExplicitCastInCode && toSpecialType.IsSignedIntegralType())
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
861Debug.Assert(!((BoundConversion)argument).ExplicitCastInCode); 933Debug.Assert(!((BoundConversion)argument).ExplicitCastInCode);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (3)
79var result = MakeConversionNode(node, node.Syntax, rewrittenOperand, node.Conversion, node.Checked, node.ExplicitCastInCode, node.ConstantValueOpt, rewrittenType); 250return conversion.ConversionKind == ConversionKind.Identity && !conversion.ExplicitCastInCode; 1034explicitCastInCode: conversion.ExplicitCastInCode,
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (2)
240if (arg is BoundConversion { Conversion: { Kind: ConversionKind.InterpolatedStringHandler }, ExplicitCastInCode: false, Operand: var operand }) 251Debug.Assert(arguments.All(arg => arg is not BoundConversion { Conversion: { IsInterpolatedStringHandler: true }, ExplicitCastInCode: false }));
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (6)
75explicitCastInCode: conversion.ExplicitCastInCode, 122syntax, fieldAccess, elementConversions[i], boundConversion.Checked, boundConversion.ExplicitCastInCode, 199case BoundConversion { Conversion: { IsUserDefined: true } } conv when conv.ExplicitCastInCode || enclosingConversionWasExplicit: 205var deferredOperand = DeferSideEffectingArgumentToTempForTupleEquality(conv.Operand, effects, temps, conv.ExplicitCastInCode || enclosingConversionWasExplicit); 480expr.Syntax, expr, conversion, enclosing.Checked, enclosing.ExplicitCastInCode, 616conversion: conv.Conversion, @checked: conv.Checked, explicitCastInCode: conv.ExplicitCastInCode,
Operations\CSharpOperationFactory.cs (5)
1018bool isImplicit = boundConversion.WasCompilerGenerated || !boundConversion.ExplicitCastInCode || forceOperandImplicitLiteral; 1096if (boundConversion.ExplicitCastInCode && conversion.IsIdentity && boundOperand.Kind == BoundKind.Conversion) 1101if (nestedConversion.Syntax == nestedOperand.Syntax && nestedConversion.ExplicitCastInCode && 1969boundForEachStatement.Expression is not BoundConversion { Conversion.IsIdentity: true, ExplicitCastInCode: false, Operand: BoundExpression operand } ? 2415var isImplicit = conversion.WasCompilerGenerated || !conversion.ExplicitCastInCode;