Repository navigation
Copy custom attributes onto generated stunts - #244
Merged
Merged
Conversation
kzu
force-pushed
the
dev/signature-ref-generator
branch
from
September 30, 2026 01:23
af0f1d7 to
c9db1e8
Compare
…d calls see them. Optional defaults are emitted as attributes, since an override cannot spell = value without a warning.
kzu
force-pushed
the
dev/signature-ref-generator
branch
from
September 30, 2026 01:25
c9db1e8 to
5aa4370
Compare
kzu
enabled auto-merge (rebase)
September 30, 2026 01:25
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Evidence
[Serializable],[Guid], or parameter attributes. Reflection on the stunt method did not report an optional default, andInvokewithType.Missingcould not supply it.After:
AttributeTestscallsDefaulted(),Price(), andOptionalName()with the argument omitted and sees5,1.5m, and"none"in the behavior and the return value. ReflectionInvokewithType.Missinguses the copied default, includingEcho(Type.Missing, "other").Merge Danger
Door: two-way
Reverting the generator restores the previous stunt shape.
Blast Radius: generated types
[Serializable]and[Guid]on the stunt change reflection, COM identity, and formatter-based serialization for proxies of types that already had those attributes. Inheritable type and method attributes are not copied again.