dotnet / dotnet/csharpstandard
Error CS0122 when attempting to implement a nested `private protected` interface in descendant classes
Open
- Dominant language
- C#
- Stars
- 815
- Forks
- 99
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 16
Description
**Version Used**: Visual Studio 16.5.4
```
public class X: X.XI, X.XII
{
private interface XI
{
}
private protected interface XII
{
}
}
public class XX: X, X.XII
{
public void Test()
{
XII z = this;
}
}
```
**Expected Behavior**:
The class type `XX` would be able to implement the `X.XII` interface.
**Actual Behavior**:
The error "CS0122: 'X.XII' is inaccessible due to its protection level" is generated.
Contributor guide
Assessment
This issue has not been assessed yet.