Replies: 1 comment 5 replies
-
I believe that you can use |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This proposal suggests the ability to create declarations that are accessible only by Source Generators(SG) and are not emitted into the resulting assembly.
The currently available possibility to modify an existing method by Source Generator(SG) is to declare a method with a modified name, with some suffix like underscore '_'.
SG creates the new method without this suffix in the name.
It works well. But there are 2 problems:
Proposal:
For example: this attribute is created by deriving from a special class or by marking by some attribute
SG can generate declaration with the same name as the original name of the dummy declaration without naming conflicts.
This approach avoids issues related to immutability and so on. SG only appends the new code. But, in effect, it makes possible to rewrite declarations by SG.
Beta Was this translation helpful? Give feedback.
All reactions