mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Add test
This commit is contained in:
@@ -0,0 +1 @@
|
||||
class Ext : A<String>("Hello") { }
|
||||
@@ -0,0 +1,18 @@
|
||||
| file:///!unknown-binary-location/A.class:0:0:0:0 | A<String> | file:///!unknown-binary-location/A.class:0:0:0:0 | A<String> |
|
||||
| file:///!unknown-binary-location/A.class:0:0:0:0 | A<String> | file:///!unknown-binary-location/A.class:0:0:0:0 | getAnonType |
|
||||
| file:///!unknown-binary-location/If.class:0:0:0:0 | If<String> | file:///!unknown-binary-location/If.class:0:0:0:0 | getX |
|
||||
| file:///!unknown-binary-location/If.class:0:0:0:0 | If<T> | file:///!unknown-binary-location/If.class:0:0:0:0 | getX |
|
||||
| other.kt:1:1:1:34 | Ext | other.kt:1:1:1:34 | Ext |
|
||||
| test.kt:0:0:0:0 | TestKt | test.kt:19:1:19:38 | user |
|
||||
| test.kt:1:1:5:1 | If | test.kt:3:3:3:11 | getX |
|
||||
| test.kt:7:1:17:1 | A | test.kt:7:6:17:1 | A |
|
||||
| test.kt:7:1:17:1 | A | test.kt:9:3:11:3 | anonType |
|
||||
| test.kt:7:1:17:1 | A | test.kt:9:3:11:3 | getAnonType |
|
||||
| test.kt:7:1:17:1 | A | test.kt:13:3:15:3 | privateAnonType |
|
||||
| test.kt:7:1:17:1 | A | test.kt:13:11:15:3 | getPrivateAnonType |
|
||||
| test.kt:9:18:11:3 | new If<T>(...) { ... } | test.kt:9:18:11:3 | |
|
||||
| test.kt:9:18:11:3 | new If<T>(...) { ... } | test.kt:10:5:10:22 | x |
|
||||
| test.kt:9:18:11:3 | new If<T>(...) { ... } | test.kt:10:14:10:22 | getX |
|
||||
| test.kt:13:33:15:3 | new If<T>(...) { ... } | test.kt:13:33:15:3 | |
|
||||
| test.kt:13:33:15:3 | new If<T>(...) { ... } | test.kt:14:5:14:22 | x |
|
||||
| test.kt:13:33:15:3 | new If<T>(...) { ... } | test.kt:14:14:14:22 | getX |
|
||||
@@ -0,0 +1,19 @@
|
||||
interface If<T> {
|
||||
|
||||
val x : T
|
||||
|
||||
}
|
||||
|
||||
open class A<T>(t: T) {
|
||||
|
||||
val anonType = object : If<T> {
|
||||
override val x = t
|
||||
}
|
||||
|
||||
private val privateAnonType = object : If<T> {
|
||||
override val x = t
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun user(x: A<String>) = x.anonType.x
|
||||
@@ -0,0 +1,5 @@
|
||||
import java
|
||||
|
||||
from ClassOrInterface ci, Member m
|
||||
where m = ci.getAMember() and ci.getSourceDeclaration().fromSource()
|
||||
select ci, m
|
||||
Reference in New Issue
Block a user