Version Used:
features/required-members
Steps to Reproduce:
public class Outer {
protected class ProtectedClass {
protected required int ProtectedProperty { get; set; }
}
}
class Derived : Outer {
public void Test() {
var p = new ProtectedClass() // error "Required member 'Outer.ProtectedClass.ProtectedProperty' must be set
{
// ProtectedProperty = 1 // cannot set the property because it is inaccessible
};
}
}
Expected Behavior:
Error CS9503 is shown for ProtectedProperty declaration
Actual Behavior:
No error for ProtectedProperty declaration is shown but it is impossible to create instance of ProtectedClass in derived class
Version Used:
features/required-members
Steps to Reproduce:
Expected Behavior:
Error CS9503 is shown for
ProtectedPropertydeclarationActual Behavior:
No error for
ProtectedPropertydeclaration is shown but it is impossible to create instance ofProtectedClassin derived class