Project
ReSharper
Priority
Show-stopper
Type
Bug
Fix versions
2.5.1, 3.0
State
Fixed
Assignee
Andrey Simanovsky
Subsystem
Refactoring
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Vladimir Reshetnikov
    5 years ago (23 Aug 2006 16:11)
  • Updated by   Vladimir Reshetnikov
    5 years ago (13 Dec 2006 21:36)
  • Jira: RSRP-28188
    (history, comments)
 
RSRP-28188 'Move nested class to outer scope' changes its accessibility
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
internal class A
{
}

internal class B
{
    public class C : A { }
}

Note that effective accessiblity of C is 'internal', so it is OK that it is derived from internal class.
Apply refactoring 'move to outer scope' to nested class C.

internal class A
{
}

internal class B
{
}

public class C : A { } /* error CS0060: Inconsistent accessibility: base class 'A' is less accessible than class 'C' */

Preferred result:

internal class A
{
}

internal class B
{
}

internal class C : A { } /* accessibility OK */

Issue was closed
Comments (0)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Issue has no comments