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#: Renamed method implementation not converted #444

Open
mrmonday opened this issue Nov 26, 2019 · 1 comment
Open

VB -> C#: Renamed method implementation not converted #444

mrmonday opened this issue Nov 26, 2019 · 1 comment
Labels

Comments

@mrmonday
Copy link
Contributor

@mrmonday mrmonday commented Nov 26, 2019

Input code

Public Interface IFoo
    Sub Foo()
End Interface

Public Class Foo
    Implements IFoo
    Sub Bar() Implements IFoo.Foo
    End Sub
End Class

Erroneous output

public partial interface IFoo
{
    void Foo();
}

public partial class Foo : IFoo
{
    public void Bar()
    {
    }
}

Expected output

public partial interface IFoo
{
    void Foo();
}

public partial class Foo : IFoo
{
    public void Foo()
    {
    }
    public void Bar()
    {
        Foo();
    }
}

Details

Worth checking the IL for this.

Also worth checking further inheritance behaviour - I'm not sure if the explicit implements clause in VB maps to the explicit interface implementation in C# which has different semantics.

@mrmonday mrmonday added the VB -> C# label Nov 26, 2019
@GrahamTheCoder

This comment has been minimized.

Copy link
Member

@GrahamTheCoder GrahamTheCoder commented Nov 26, 2019

EDIT Now I've actually read what you said properly
In IL I'm pretty certain you can change the name of something when explicitly implementing it. In c# you can't, so your solution seems like a sensible one.

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.