mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Visibility consistency query: allow $default methods to have package-private (default) visibility
This commit is contained in:
@@ -19,5 +19,6 @@ where
|
||||
// TODO: This ought to have visibility information
|
||||
not m.getName() = "<clinit>" and
|
||||
count(visibility(m)) != 1 and
|
||||
not (count(visibility(m)) = 2 and visibility(m) = "public" and visibility(m) = "internal") // This is a reasonable result, since the JVM symbol is declared public, but Kotlin metadata flags it as internal
|
||||
not (count(visibility(m)) = 2 and visibility(m) = "public" and visibility(m) = "internal") and // This is a reasonable result, since the JVM symbol is declared public, but Kotlin metadata flags it as internal
|
||||
not (count(visibility(m)) = 0 and m.getName().matches("%$default")) // This is a reasonable result because the $default forwarder methods corresponding to private methods are package-private.
|
||||
select m, concat(visibility(m), ", ")
|
||||
|
||||
Reference in New Issue
Block a user