Repository navigation
Relax auto-property skip logic and improve coverage for records - #1941
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses an issue with code coverage for C# records that do not have a primary constructor, and updates the logic for skipping auto-property assignments. The main focus is to ensure that records without primary constructors are correctly instrumented and covered, and to simplify the logic for skipping inline assigned auto-properties.
Test coverage improvements for records:
Instrumentation.AutoProps.csto cover records without primary constructors and abstract records, ensuring these scenarios are now properly handled and covered by instrumentation.Logic simplification:
SkipInlineAssignedAutoPropertymethod inCecilSymbolHelper.csto only skip generated backing field assignments whenskipAutoPropsis enabled, removing unnecessary checks and making the logic clearer.This PR is similar to #1761 but without refactoring.
Resolves issue #1633