mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Add test for checking generated invoke/get/set visibility
This commit is contained in:
@@ -124,3 +124,4 @@ fieldAccessInsideInvocationMethods
|
||||
| reflection.kt:99:14:99:29 | ...::... | reflection.kt:99:14:99:29 | new Function1<String,Inner<String>>(...) { ... } | reflection.kt:99:14:99:29 | invoke | reflection.kt:99:14:99:29 | this.<dispatchReceiver> |
|
||||
| reflection.kt:109:17:109:27 | ...::... | reflection.kt:109:17:109:27 | new KMutableProperty0<Integer>(...) { ... } | reflection.kt:109:17:109:27 | get | reflection.kt:109:17:109:27 | this.<dispatchReceiver> |
|
||||
| reflection.kt:109:17:109:27 | ...::... | reflection.kt:109:17:109:27 | new KMutableProperty0<Integer>(...) { ... } | reflection.kt:109:17:109:27 | set | reflection.kt:109:17:109:27 | this.<dispatchReceiver> |
|
||||
memberVisibility
|
||||
|
||||
@@ -80,3 +80,9 @@ query predicate fieldAccessInsideInvocationMethods(
|
||||
m.getName() = ["invoke", "get", "set"] and
|
||||
access.getEnclosingCallable() = m
|
||||
}
|
||||
|
||||
query predicate memberVisibility(ClassInstanceExpr e, Method m, string modifier) {
|
||||
(e instanceof MemberRefExpr or e instanceof PropertyRefExpr) and
|
||||
e.getAnonymousClass().getAMethod() = m and
|
||||
m.hasModifier(modifier)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user