Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix CodeWriter Dispose #43

Merged
merged 1 commit into from
Oct 9, 2022
Merged

Fix CodeWriter Dispose #43

merged 1 commit into from
Oct 9, 2022

Conversation

dansiegel
Copy link
Owner

Description

The new BlockWriter PR #40 introduce a subtle breaking change in the Dispose change the if to while. This results in a break where once the first block body such as a method is closed (i.e. Disposed) the entire class is closed as a result rather than simply removing the single indent. This PR changes this back to the intended behavior and adds additional tests to prevent future regressions.

@dansiegel dansiegel merged commit 6ed1f70 into master Oct 9, 2022
@dansiegel dansiegel deleted the codewriter-fix branch October 9, 2022 14:56
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: MethodBuilder disposes CodeWriter after writing first method closing the class and namespace prematurely
1 participant