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#: named optional parameter that's a C# keyword isn't always escaped #1092

Closed
TymurGubayev opened this issue Apr 18, 2024 · 0 comments
Labels
VB -> C# Specific to VB -> C# conversion

Comments

@TymurGubayev
Copy link
Contributor

VB.Net input code

    Sub S1(Optional a As Object = Nothing, Optional [default] As String = "")
    End Sub

    Sub S()
        S1(, "a")
    End Sub

Erroneous output

        public void S1(object a = null, string @default = "")
        {
        }

        public void S()
        {
            this.S1(default: "a");
        }

Expected output

        public void S1(object a = null, string @default = "")
        {
        }

        public void S()
        {
            this.S1(@default: "a");
        }

Details

  • Product in use: VS extension
  • Version in use: 5143c08
  • Did you see it working in a previous version, which? no
  • Any other relevant information to the issue, or your interest in contributing a fix.
@TymurGubayev TymurGubayev added the VB -> C# Specific to VB -> C# conversion label Apr 18, 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