Reverted IsImplicit to original code to be able to handle lowered bound trees in the future.

上级 b61a6712
......@@ -796,7 +796,7 @@ private IConversionOperation CreateBoundAsOperatorOperation(BoundAsOperator boun
bool isChecked = false;
ITypeSymbol type = boundAsOperator.Type;
Optional<object> constantValue = ConvertToOptional(boundAsOperator.ConstantValue);
bool isImplicit = false; // as expressions can never be implicitly created
bool isImplicit = boundAsOperator.WasCompilerGenerated;
return new LazyCSharpConversionExpression(operand, conversion, isTryCast, isChecked, _semanticModel, syntax, type, constantValue, isImplicit);
}
......
......@@ -517,7 +517,7 @@ Namespace Microsoft.CodeAnalysis.Operations
Private Function CreateBoundTryCastOperation(boundTryCast As BoundTryCast) As IOperation
Dim syntax As SyntaxNode = boundTryCast.Syntax
Dim type As ITypeSymbol = boundTryCast.Type
Dim isImplicit As Boolean = False ' Try Cast can never be an implicit operation
Dim isImplicit As Boolean = boundTryCast.WasCompilerGenerated
Dim constantValue As [Optional](Of Object) = ConvertToOptional(boundTryCast.ConstantValueOpt)
Dim conversionInformation = CreateConversionOperand(boundTryCast.Operand, boundTryCast.ConversionKind, boundTryCast.Syntax, boundTryCast.Type)
......@@ -540,7 +540,7 @@ Namespace Microsoft.CodeAnalysis.Operations
Dim syntax As SyntaxNode = boundDirectCast.Syntax
Dim type As ITypeSymbol = boundDirectCast.Type
Dim constantValue As [Optional](Of Object) = ConvertToOptional(boundDirectCast.ConstantValueOpt)
Dim isImplicit As Boolean = False ' Direct Cast can never be an implicit operation
Dim isImplicit As Boolean = boundDirectCast.WasCompilerGenerated
Dim conversionInformation = CreateConversionOperand(boundDirectCast.Operand, boundDirectCast.ConversionKind, boundDirectCast.Syntax, boundDirectCast.Type)
Dim operand As Lazy(Of IOperation) = conversionInformation.Operation
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册