1 write to ExplicitCastInCode
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
2963this.ExplicitCastInCode = explicitCastInCode;
41 references to ExplicitCastInCode
Microsoft.CodeAnalysis.CSharp (41)
Binder\RefSafetyAnalysis.cs (1)
1054inlineArray: node.Expression is not BoundConversion { Conversion.IsIdentity: true, ExplicitCastInCode: false, Operand: BoundExpression operand } ? node.Expression : operand,
BoundTree\BoundExpression.cs (1)
480return this.Update(operand: operand, this.Conversion, this.IsBaseConversion, this.Checked, this.ExplicitCastInCode, this.ConstantValueOpt, this.ConversionGroupOpt, this.OriginalUserDefinedConversionsOpt, this.Type);
CodeGen\EmitConversion.cs (1)
190if (conversion.ExplicitCastInCode)
FlowAnalysis\NullableWalker.cs (3)
5638if ((node.RightOperand as BoundConversion)?.ExplicitCastInCode != false && 8057Debug.Assert(group != null || !conversion.ExplicitCastInCode); // Explicit conversions should include a group. 9462fromExplicitCast: conversionOpt?.ExplicitCastInCode ?? false,
Generated\BoundNodes.xml.Generated.cs (5)
2984if (operand != this.Operand || conversion != this.Conversion || isBaseConversion != this.IsBaseConversion || @checked != this.Checked || explicitCastInCode != this.ExplicitCastInCode || constantValueOpt != this.ConstantValueOpt || conversionGroupOpt != this.ConversionGroupOpt || originalUserDefinedConversionsOpt != this.OriginalUserDefinedConversionsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 11243return node.Update(operand, node.Conversion, node.IsBaseConversion, node.Checked, node.ExplicitCastInCode, node.ConstantValueOpt, node.ConversionGroupOpt, node.OriginalUserDefinedConversionsOpt, type); 13274updatedNode = node.Update(operand, node.Conversion, node.IsBaseConversion, node.Checked, node.ExplicitCastInCode, node.ConstantValueOpt, node.ConversionGroupOpt, node.OriginalUserDefinedConversionsOpt, infoAndType.Type!); 13279updatedNode = node.Update(operand, node.Conversion, node.IsBaseConversion, node.Checked, node.ExplicitCastInCode, node.ConstantValueOpt, node.ConversionGroupOpt, node.OriginalUserDefinedConversionsOpt, node.Type); 15630new TreeDumperNode("explicitCastInCode", node.ExplicitCastInCode, null),
Lowering\ClosureConversion\ClosureConversion.cs (1)
1399if (_inExpressionLambda && conversion.ExplicitCastInCode)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (5)
670if (conversion != null && !conversion.ExplicitCastInCode) 722return node.ExplicitCastInCode ? Convert(operand, node.Type, false) : operand; 727return Convert(Visit(node.Operand), node.Operand.Type, node.Type, node.Checked, node.ExplicitCastInCode); 738return Convert(Constant(_bound.Null(_objectType)), _objectType, node.Type, false, node.ExplicitCastInCode); 740return Convert(Visit(node.Operand), node.Operand.Type, node.Type, node.Checked, node.ExplicitCastInCode);
Lowering\DiagnosticsPass_Warnings.cs (5)
144if (conversion.ExplicitCastInCode) break; 347return node.Kind == BoundKind.Conversion && ((BoundConversion)node).ExplicitCastInCode; 355if (conv.ExplicitCastInCode) return false; 442if (conversion.ExplicitCastInCode) 688if (conv.ExplicitCastInCode && toSpecialType.IsSignedIntegralType())
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
844Debug.Assert(!((BoundConversion)argument).ExplicitCastInCode); 915Debug.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); 252return conversion.ConversionKind == ConversionKind.Identity && !conversion.ExplicitCastInCode; 1021explicitCastInCode: 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, 121syntax, fieldAccess, elementConversions[i], boundConversion.Checked, boundConversion.ExplicitCastInCode, null, null, destElementTypes[i].Type, boundConversion.HasErrors); 196case BoundConversion { Conversion: { IsUserDefined: true } } conv when conv.ExplicitCastInCode || enclosingConversionWasExplicit: 202var deferredOperand = DeferSideEffectingArgumentToTempForTupleEquality(conv.Operand, effects, temps, conv.ExplicitCastInCode || enclosingConversionWasExplicit); 475expr.Syntax, expr, conversion, enclosing.Checked, enclosing.ExplicitCastInCode, 611conversion: conv.Conversion, @checked: conv.Checked, explicitCastInCode: conv.ExplicitCastInCode,
Lowering\MethodToClassRewriter.cs (1)
305node.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 && 1978boundForEachStatement.Expression is not BoundConversion { Conversion.IsIdentity: true, ExplicitCastInCode: false, Operand: BoundExpression operand } ? 2424var isImplicit = conversion.WasCompilerGenerated || !conversion.ExplicitCastInCode;