Closed KalleOlaviNiemitalo closed 5 months ago
@KalleOlaviNiemitalo – thanks. Added PR #1110, Github wouldn't let me add you directly as a reviewer but don't let that stop you!
I did wonder about shortening the text to reference "instance members" but went with the one word fix.
Describe the bug
In the C# 7 standard, §12.8.14 (Base access) says:
This should allow base_access also in a method_body, ref_method_body, property_body, ref_property_body, indexer_body, ref_indexer_body, constructor_body, or finalizer_body that is not a block.
Example
This should be allowed:
Expected behavior
Specify that the preceding is allowed.
Additional context
Exclude anonymous_function_body, local_function_body, and ref_local_function_body. They can contain a base_access only when they occur within some other body.
Exclude static_constructor_body and operator_body. They are not used in instance members.