mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Kotlin: Change Modifiable::isPublic to not cover Kotlin internal members
This commit is contained in:
@@ -46,8 +46,11 @@ abstract class Modifiable extends Element {
|
||||
// TODO: `isSealed()` conflicts with `ClassOrInterface.isSealed()`. What name do we want to use here?
|
||||
predicate isSealedKotlin() { this.hasModifier("sealed") }
|
||||
|
||||
/** Holds if this element has a `public` modifier or is implicitly public. */
|
||||
predicate isPublic() { this.hasModifier("public") }
|
||||
/**
|
||||
* Holds if this element has a `public` modifier or is implicitly public.
|
||||
* Kotlin `internal` members, which are `public` in JVM Bytecode, are not considered `public`.
|
||||
*/
|
||||
predicate isPublic() { this.hasModifier("public") and not this.isInternal() }
|
||||
|
||||
/** Holds if this element has a `protected` modifier. */
|
||||
predicate isProtected() { this.hasModifier("protected") }
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
isPublic
|
||||
| Kotlin.kt:2:11:3:2 | kotlinFun$main |
|
||||
isInternal
|
||||
| Kotlin.kt:2:11:3:2 | kotlinFun$main |
|
||||
#select
|
||||
|
||||
Reference in New Issue
Block a user