File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
csharp/ql/src/semmle/code/csharp Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,12 @@ class Modifiable extends Declaration, @modifiable {
9696 /** Holds if this declaration is `async`. */
9797 predicate isAsync ( ) { this .hasModifier ( "async" ) }
9898
99- private predicate isReallyPrivate ( ) { this .isPrivate ( ) and not this .isProtected ( ) }
99+ private predicate isReallyPrivate ( ) {
100+ this .isPrivate ( ) and
101+ not this .isProtected ( ) and
102+ // Rare case when a member is defined with the same name in multiple assemblies with different visibility
103+ not this .isPublic ( )
104+ }
100105
101106 /**
102107 * Holds if this declaration is effectively `private`. A declaration is considered
@@ -116,9 +121,13 @@ class Modifiable extends Declaration, @modifiable {
116121 }
117122
118123 private predicate isReallyInternal ( ) {
119- this .isInternal ( ) and not this .isProtected ( )
120- or
121- this .isPrivate ( ) and this .isProtected ( )
124+ (
125+ this .isInternal ( ) and not this .isProtected ( )
126+ or
127+ this .isPrivate ( ) and this .isProtected ( )
128+ ) and
129+ // Rare case when a member is defined with the same name in multiple assemblies with different visibility
130+ not this .isPublic ( )
122131 }
123132
124133 /**
You can’t perform that action at this time.
0 commit comments