You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yep good question. The answer is that in the end I'd like to do what you say. But when something's broken, I try to aim to initially get it working as close to what VB produces in the general case as possible. i.e. If it was Return x + 1, I believe the VB compiler generates Return Conversions.ToString(x+1) under the covers.
Once it fundamentally works, I can iterate and cover special cases like:
In this specific case we could use _semanticModel.GetConstantValue to optimize away the need for a conversion. In some similar cases this already happens in fact.
I haven't checked whether (x+1).ToString() would do the same for an integer type. If so, I'd also like to move to using that.
Input code
Erroneous output
Expected output
Details
Conversions
methodsThe text was updated successfully, but these errors were encountered: