Skip to content

Commit

Permalink
Respect prior conversion details
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamTheCoder committed Jan 22, 2025
1 parent 6704752 commit c5180ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CodeConverter/CSharp/TypeConversionAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private ExpressionSyntax AddTypeConversion(VBSyntax.ExpressionSyntax vbNode, Exp
csNode = AddTypeConversion(vbNode, csNode, TypeConversionKind.NonDestructiveCast, addParenthesisIfNeeded, vbType, enumUnderlyingType);
return AddTypeConversion(vbNode, csNode, TypeConversionKind.Conversion, addParenthesisIfNeeded, enumUnderlyingType, vbConvertedType);
case TypeConversionKind.LiteralSuffix:
if (vbNode is VBSyntax.LiteralExpressionSyntax { Token: { Value: { } val, Text: { } text } } && LiteralConversions.GetLiteralExpression(val, text, vbConvertedType) is { } csLiteral) {
if (csNode is CSSyntax.LiteralExpressionSyntax && vbNode is VBSyntax.LiteralExpressionSyntax { Token: { Value: { } val, Text: { } text } } && LiteralConversions.GetLiteralExpression(val, text, vbConvertedType) is { } csLiteral) {
return csLiteral;
}
return csNode;
Expand Down

0 comments on commit c5180ef

Please sign in to comment.