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#: Inferred empty array type missing #495

Closed
GrahamTheCoder opened this issue Jan 14, 2020 · 0 comments
Closed

VB -> C#: Inferred empty array type missing #495

GrahamTheCoder opened this issue Jan 14, 2020 · 0 comments
Labels
compilation error A bug where the converted output won't compile Small Estimated less than 4 hours work VB -> C# Specific to VB -> C# conversion

Comments

@GrahamTheCoder
Copy link
Member

Input code

Public Function Empty() As Integer()
    Return {}
End Function

Erroneous output

public int[] Empty()
{
    return new[] { };
}

Expected output

public int[] Empty()
{
    return new int[0];
}

Details

  • Product in use: 7.6 Web
  • If there's a known inferred type from VB, e.g. the ConvertedType, then use that, otherwise just use object
@GrahamTheCoder GrahamTheCoder added VB -> C# Specific to VB -> C# conversion compilation error A bug where the converted output won't compile labels Jan 14, 2020
@GrahamTheCoder GrahamTheCoder added the Small Estimated less than 4 hours work label Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compilation error A bug where the converted output won't compile Small Estimated less than 4 hours work VB -> C# Specific to VB -> C# conversion
Projects
None yet
Development

No branches or pull requests

1 participant