History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-29003
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Dmitry Lomov
Reporter: Vladimir Reshetnikov
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
ReSharper

Protected constructor is not accessible here

Created: 26 Sep 06 12:29   Updated: 27 Dec 07 10:38
Component/s: PSI - Resolve
Fix Version/s: Future Versions
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Duplicate
 
This issue is duplicated by:
RSRP-55166 Error protected constructor is not ac... Critical Closed
RSRP-41887 Daemon doesn't consider the following... Major Closed

Build: 262


 Description  « Hide
public class Base
{
protected Base() { }
}

public class Derived : Base
{
public static void Main()

{ Base obj = new Base(); /* error CS1540: Cannot access protected member 'Base.Base()' via a qualifier of type 'Base'; the qualifier must be of type 'Derived' (or derived from it) */ }

}

Remarks: as of 2.0, derived class can access a protected instance constructor of a base
class only in a constructor-initializer.



 All   Comments   Work Log   Change History      Sort Order:
Vladimir Reshetnikov - 27 Sep 06 16:34
I propose to show warning in VS2003 in such cases (compatibility problem)