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#: Namespaces with different cases merged #421

Closed
mrmonday opened this issue Nov 14, 2019 · 1 comment · Fixed by #424
Closed

VB -> C#: Namespaces with different cases merged #421

mrmonday opened this issue Nov 14, 2019 · 1 comment · Fixed by #424

Comments

@mrmonday
Copy link
Contributor

@mrmonday mrmonday commented Nov 14, 2019

Input code

Namespace [Aaa]
    Friend Class A
    End Class
End Namespace

Namespace Global.aaa
    Friend Class B
    End Class
End Namespace

Friend Module C
    Sub Main()
        Dim x = New aaa.A
        Dim y = New Aaa.B
    End Sub
End Module

Erroneous output

namespace Aaa
{
    internal class A
    {
    }
}

namespace Aaa
{
    internal class B
    {
    }
}

internal static class C
{
    public static void Main()
    {
        var x = new Aaa.A();
        var y = new Aaa.B();
    }
}

Expected output

namespace Aaa
{
    internal class A
    {
    }
}

namespace aaa
{
    internal class B
    {
    }
}

internal static class C
{
    public static void Main()
    {
        var x = new Aaa.A();
        var y = new aaa.B();
    }
}

Details

  • Version in use: 7.3.0

The original VB is hard to enter in VS, since it likes to auto-correct. The original case was cross-project, where it's easier to achieve (but harder to put into a test case). According to ILSpy this does end up as two different namespaces.

mrmonday added a commit to mrmonday/CodeConverter that referenced this issue Nov 14, 2019
@mrmonday mrmonday mentioned this issue Nov 14, 2019
1 of 1 task complete
mrmonday added a commit to mrmonday/CodeConverter that referenced this issue Nov 15, 2019
@GrahamTheCoder

This comment has been minimized.

Copy link
Member

@GrahamTheCoder GrahamTheCoder commented Nov 15, 2019

I've tagged this as compilation error since I believe it's a source (and binary) level break for C# referencing the converted assembly.

GrahamTheCoder added a commit to mrmonday/CodeConverter that referenced this issue Nov 17, 2019
GrahamTheCoder added a commit to mrmonday/CodeConverter that referenced this issue Nov 19, 2019
GrahamTheCoder added a commit that referenced this issue Nov 19, 2019
Ensure casing matches for namespaces [#421]
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.