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#: Operator overload support #46

Closed
GrahamTheCoder opened this issue Mar 14, 2018 · 3 comments
Closed

VB -> C#: Operator overload support #46

GrahamTheCoder opened this issue Mar 14, 2018 · 3 comments

Comments

@GrahamTheCoder
Copy link
Member

GrahamTheCoder commented Mar 14, 2018

Example Input (we should test other operator overloads too):

[Fact]
public void PlusToken()
{
TestConversionVisualBasicToCSharp(@"Public Class AcmeClass
Public Shared Operator +(i As Integer, ac As AcmeClass) As Integer
Return 0
End Operator
End Class", @"using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualBasic;

public class AcmeClass
{
public static int operator +(int i, AcmeClass ac)
{
return 0;
}
}");
}

Originally reported here #29 (comment)

@GrahamTheCoder GrahamTheCoder added help wanted needs-repro Needs either the input that caused the error, or more information to allow reproducing the error labels Mar 14, 2018
@GrahamTheCoder
Copy link
Member Author

Closing this as can't repro until there's more information

@BaronBodissey
Copy link

[Fact]
public void PlusToken()
{
TestConversionVisualBasicToCSharp(@"Public Class AcmeClass
Public Shared Operator +(i As Integer, ac As AcmeClass) As Integer
Return 0
End Operator
End Class", @"using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualBasic;

public class AcmeClass
{
public static int operator +(int i, AcmeClass ac)
{
return 0;
}
}");
}

@GrahamTheCoder GrahamTheCoder removed the needs-repro Needs either the input that caused the error, or more information to allow reproducing the error label Mar 23, 2018
@GrahamTheCoder GrahamTheCoder changed the title System.NotSupportedException: PlusToken not supported! VB -> C#: Operator overload support Mar 23, 2018
@GrahamTheCoder
Copy link
Member Author

I've added the Like and ^ operator overloads to known limitations since they won't be converted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants