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

Ensure base.Finalize() is removed #275

Merged

Conversation

Projects
None yet
2 participants
@mrmonday
Copy link
Contributor

mrmonday commented Apr 8, 2019

Closes #269

Problem

base.Finalize() is not removed when converting from VB to C#

Solution

I'm not sure this is the right/nicest way of handing this:

  • I don't check that we're actually inside ~Finalize()

  • It adds an overhead for every expression statement

  • I wasn't sure how to just add a comment, so there's a leading ; in there. I decided a comment would be useful, since we're removing code - I'm happy to leave nothing there instead though.

  • At least one test covering the code changed

  • All tests pass

@GrahamTheCoder

This comment has been minimized.

Copy link
Member

GrahamTheCoder commented Apr 8, 2019

Thanks for the PR, looks good to me!
Yep, in this visitor pattern it is slightly annoying to just add a comment since it has to attach to something. I think just returning an empty list would be slightly preferable since it's a correct conversion and the comment might confuse people into trying to uncomment it. Would you mind switching it to do that before I merge it?

@mrmonday mrmonday force-pushed the mrmonday:269-remove-base-finalize branch from 09ad2ef to be8f7b7 Apr 8, 2019

@mrmonday

This comment has been minimized.

Copy link
Contributor Author

mrmonday commented Apr 8, 2019

Done!

@GrahamTheCoder GrahamTheCoder merged commit 0e69b67 into icsharpcode:master Apr 8, 2019

@mrmonday mrmonday deleted the mrmonday:269-remove-base-finalize branch Apr 19, 2019

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.