Skip to content

Conversation

kooldev
Copy link
Contributor

@kooldev kooldev commented Oct 3, 2022

Internal attributes may cause compilation errors when used on promoted properties. This was reported in #9420. This PR fixes the reported bug by dropping unsupported internal attributes during compilation of promoted properties. This works for attributes that apply to a parameter but not a property (has been reported as bug). It also fixes the situation where an attribute applies to a property but not a parameter (not yet reported as bug).

Userland attributes are not affected by this change and unfortunately (due to the way they are implemented) cannot be fixed in the same way.

@adoy
Copy link
Member

adoy commented Oct 27, 2022

Looks good to me ! Thanks

@nicolas-grekas
Copy link
Contributor

This change makes sense to me. Userland attributes don't have this issue because they're read (thus checked) on demand. An alternate approach might be to read internal attributes on demand also, but this might be more involving. This would allow using eg SensitiveParameter on properties since they then would be unchecked. On the other hand, the approach in this PR makes checking for the location of internal attributes more strict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants