-
Notifications
You must be signed in to change notification settings - Fork 222
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#: Error with multiple variable declarations with implicit type #373
Comments
In looking at the documentation here:
both x and y are strongly typed as Date variable type so the expected output would be
Because the intent of both x and y being typed to DateTime and not var are then being met. In addition when testing the first option with "," separator in C# is not valid syntax so a 2 line declaration is needed. So I believe for this issue the expected output should be revised. |
Thanks for your interest. You're correct that both x and y should be DateTimes. Both the original, and your suggestion achieve that, and are acceptable conversions. I'd happily accept a PR for either, with a marginal preference for the one mentioned in the current issue description. Here's a runnable example that shows the syntax is valid: |
Yes, you are correct. I'm not sure why my system was flagging the original code as bad, but it's taking it now. I'm working on learning the ins and outs of Rosalyn. Will submit PR or update if I can get my head wrapped around it. |
Great to hear. I think the relevant method is called Feel free to ask questions or submit partial prs to have discussion around. |
Input code
Erroneous output
Expected output
Alternatively, this could be split into two declarations.
Details
Error:
Version used: master @ 3ffc597
The text was updated successfully, but these errors were encountered: