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#: New constraint in wrong position #271

Closed
mrmonday opened this Issue Apr 5, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@mrmonday
Copy link
Contributor

mrmonday commented Apr 5, 2019

Input code

Public Interface Foo
End Interface

Public Class Bar(Of x As {New, Foo})

End Class

Erroneous output

public interface Foo
{
}

public class Bar<x> where x : new(), Foo
{
}

Expected output

public interface Foo
{
}

public class Bar<x> where x : Foo, new()
{
}

Details

Product in use: VS extension

Version in use: 6.6.0

Error from C#:

CS0401	The new() constraint must be the last constraint specified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.