-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
With #119017, the trimming tools ignore DAM on extension properties (and don't produce any warnings about it).
An extension property lowers to a property on a compiler-generated type, a stub method on the generated type, and an implementation static method on the user-declared type. To avoid having to reverse this lowering in ILLink and ILC, annotations on extension properties are not automatically propagated to the parameter/return of the static method that plays the role of the set/get accessor.
Options to address this:
- Leave it as-is (annotations on extension properties have no effect)
- Warn about the unused annotation
- Reverse the extension property lowering to propagate the annotation
Since property annotations don't normally flow to the accessor methods (that's an ILLink rule, not a Roslyn behavior, to my knowledge), I don't think this should be handled by Roslyn via CompilerLoweringPreserve.
Personally, I think 2. makes the most sense, but 1. is fine too since I expect this to be rare.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status