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 {
96
96
/** Holds if this declaration is `async`. */
97
97
predicate isAsync ( ) { this .hasModifier ( "async" ) }
98
98
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
+ }
100
105
101
106
/**
102
107
* Holds if this declaration is effectively `private`. A declaration is considered
@@ -116,9 +121,13 @@ class Modifiable extends Declaration, @modifiable {
116
121
}
117
122
118
123
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 ( )
122
131
}
123
132
124
133
/**
You can’t perform that action at this time.
0 commit comments