fix: preserve protected internal accessibility on overridden members#788
Conversation
When overriding a `protected internal virtual` member, the override must remain `protected internal` whenever the overriding code can see the declaring assembly's internals (same assembly or InternalsVisibleTo). Mapping unconditionally to `protected` produced CS0507 in those cases. Resolve the override accessibility once at entity construction with the source assembly in scope, and emit the resolved string from the method, property, accessor, and event sites.
|
🚀 Benchmark ResultsDetails
Details
Details
Details
Details
Details
|
…ibility on overridden members (#788) by Valentin Breuß
…ibility on overridden members (#788) by Valentin Breuß
|
This is addressed in release v3.2.1. |



When overriding a
protected internal virtualmember, the override must remainprotected internalwhenever the overriding code can see the declaring assembly's internals (same assembly or InternalsVisibleTo). Mapping unconditionally toprotectedproduced CS0507 in those cases.Resolve the override accessibility once at entity construction with the source assembly in scope, and emit the resolved string from the method, property, accessor, and event sites.