Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VB -> C#: Numeric literals not converted correctly #329

Open
mrmonday opened this issue Jul 18, 2019 · 1 comment

Comments

@mrmonday
Copy link
Contributor

commented Jul 18, 2019

Input code

Namespace ConsoleApp4
    Friend Class Program

        Const x As Byte = 4
        Public Shared Sub Main(ByVal args As String())
        End Sub
    End Class
End Namespace

Erroneous output

using Microsoft.VisualBasic.CompilerServices;

namespace ConsoleApp4
{
    namespace ConsoleApp4
    {
        internal class Program
        {
            private const byte x = Conversions.ToByte(4);
            public static void Main(string[] args)
            {
            }
        }
    }
}

Expected output

using Microsoft.VisualBasic.CompilerServices;

namespace ConsoleApp4
{
    namespace ConsoleApp4
    {
        internal class Program
        {
            private const byte x = 4;
            public static void Main(string[] args)
            {
            }
        }
    }
}

Details

Product in use: VS extension

Version in use: 6.9.0.0

@mrmonday

This comment has been minimized.

Copy link
Contributor Author

commented Jul 18, 2019

Same issue with other types, not just byte.

@GrahamTheCoder GrahamTheCoder changed the title VB -> C#: Constant bytes not converted correctly VB -> C#: Numeric literals not converted correctly Aug 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.