mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Fix isEffectively* predicates to members extracted from multiple assemblies
This commit is contained in:
@@ -96,7 +96,12 @@ class Modifiable extends Declaration, @modifiable {
|
||||
/** Holds if this declaration is `async`. */
|
||||
predicate isAsync() { this.hasModifier("async") }
|
||||
|
||||
private predicate isReallyPrivate() { this.isPrivate() and not this.isProtected() }
|
||||
private predicate isReallyPrivate() {
|
||||
this.isPrivate() and
|
||||
not this.isProtected() and
|
||||
// Rare case when a member is defined with the same name in multiple assemblies with different visibility
|
||||
not this.isPublic()
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this declaration is effectively `private`. A declaration is considered
|
||||
@@ -116,9 +121,13 @@ class Modifiable extends Declaration, @modifiable {
|
||||
}
|
||||
|
||||
private predicate isReallyInternal() {
|
||||
this.isInternal() and not this.isProtected()
|
||||
or
|
||||
this.isPrivate() and this.isProtected()
|
||||
(
|
||||
this.isInternal() and not this.isProtected()
|
||||
or
|
||||
this.isPrivate() and this.isProtected()
|
||||
) and
|
||||
// Rare case when a member is defined with the same name in multiple assemblies with different visibility
|
||||
not this.isPublic()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user