Conversation
…tom attr encoding); prepare release 8.7.0 Adds GenerativeCustomAttributeTests.fs with 5 focused tests covering custom attribute encoding in the generative IL writer for attribute targets and argument types not previously exercised: - ObsoleteAttribute(string, bool) on the generated TYPE ITSELF - DescriptionAttribute(string) on an instance METHOD - Multiple attributes on the same method (all-attrs preserved path) - DebuggerBrowsableAttribute(DebuggerBrowsableState) on a property (enum argument round-trip via underlying int) - Scalar bool argument round-trip Also updates RELEASE_NOTES.md with 8.7.0 entry covering this and the previously-merged GenerativeMethodsTests (#505). All 147 tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 is an automated pull request from Repo Assist.
Summary
Adds
GenerativeCustomAttributeTests.fs— 5 regression tests for custom attribute encoding in the generative IL writer. These cover attribute targets and argument types not previously exercised by the existing tests inBasicGenerativeProvisionTests.fs(which only tested attributes on properties).Also updates
RELEASE_NOTES.mdwith a new8.7.0entry covering this and the previously-mergedGenerativeMethodsTests(#505).New tests
Custom attribute on a generative type round-trips correctlyObsoleteAttribute(string, bool)placed on the type definition itselfCustom attribute with bool constructor argument round-trips correctlyboolvalues survive the ECMA-335 encode/decode pathCustom attribute with enum constructor argument round-trips correctlyDebuggerBrowsableAttribute(DebuggerBrowsableState.Never)— enum arg decoded as underlying intMultiple custom attributes on a single generative method are all preserveddefineCustomAttrswrites all attributes, not just the firstCustom attribute on a generative method has correct string argumentDescriptionAttribute(string)on an instance methodRoot cause / motivation
Several custom-attribute encoding bugs were fixed in earlier PRs (
#432,#490,#501). This PR adds focused regression tests for the remaining un-covered paths:Test Status
All 147 tests pass (142 pre-existing + 5 new).