[c#] lower get accessor declarations to get_* methods #5265
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.
Reworks
get;
accessors to become METHODs instead of MEMBERs. At this point, we already have special logic for rewriting e.g.Console.Out
intoConsole.get_Out()
(as that's its real name, coming from DotNetAstGen), but we are still missing the same lowering for properties declared in the source-code, which are currently represented as MEMBERs. This PR turns them into get_* METHODs.I had to ignore 3 unit-tests related to MemberBindingExpression + ConditionalAccessExpression: the original test samples for these were using getters, though they didn't have to, as can be seen by their adapted variants using traditional fields. Thus, we didn't lose on the amount of tests, only adapted them for now. Fixing all that in the same PR would make it considerably more noisy, hence the split.