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#: Byref optional parameters to New field initializer can throw nullref #1081

Open
GrahamTheCoder opened this issue Feb 24, 2024 · 0 comments
Labels
VB -> C# Specific to VB -> C# conversion

Comments

@GrahamTheCoder
Copy link
Member

GrahamTheCoder commented Feb 24, 2024

VB.Net input code

Public Class FieldInitializationTest
    Private First As New Inner()
    Private Second As New Outer(First)
End Class

Public Class Inner
End Class

Public Class Outer
    Sub New(inner As Inner, Optional ByRef x As String = "")
    End Sub
End Class

Erroneous output

Throws

Details

  • VS extension on master
@GrahamTheCoder GrahamTheCoder added the VB -> C# Specific to VB -> C# conversion label Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VB -> C# Specific to VB -> C# conversion
Projects
None yet
Development

No branches or pull requests

1 participant