mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Kotlin: More top-level stuff
This commit is contained in:
@@ -386,7 +386,7 @@ class KotlinFileExtractor(val logger: Logger, val tw: TrapWriter) {
|
||||
return id
|
||||
}
|
||||
|
||||
fun extractProperty(p: IrProperty, parentid: Label<out DbPackage_or_reftype>) {
|
||||
fun extractProperty(p: IrProperty, parentid: Label<out DbReftype>) {
|
||||
val bf = p.backingField
|
||||
if(bf == null) {
|
||||
logger.warn("IrProperty without backing field")
|
||||
|
||||
@@ -319,7 +319,7 @@ fields(
|
||||
unique int id: @field,
|
||||
string nodeName: string ref,
|
||||
int typeid: @type ref,
|
||||
int parentid: @package_or_reftype ref,
|
||||
int parentid: @reftype ref,
|
||||
int sourceid: @field ref
|
||||
);
|
||||
|
||||
@@ -332,8 +332,6 @@ constrs(
|
||||
int sourceid: @constructor ref
|
||||
);
|
||||
|
||||
@package_or_reftype = @package | @reftype
|
||||
|
||||
methods(
|
||||
unique int id: @method,
|
||||
string nodeName: string ref,
|
||||
|
||||
@@ -2,3 +2,6 @@
|
||||
| methods.kt:10:9:10:25 | this |
|
||||
| methods.kt:10:21:10:21 | a |
|
||||
| methods.kt:10:24:10:24 | 3 |
|
||||
| methods.kt:11:9:11:28 | topLevelMethod(...) |
|
||||
| methods.kt:11:24:11:24 | b |
|
||||
| methods.kt:11:27:11:27 | 4 |
|
||||
|
||||
@@ -8,7 +8,7 @@ class Class {
|
||||
|
||||
fun anotherClassMethod(a: Int, b: Int) {
|
||||
classMethod(a, 3)
|
||||
// TODO topLevelMethod(b, 4)
|
||||
topLevelMethod(b, 4)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
| variables.kt:3:5:3:21 | prop | file://:0:0:0:0 | int | file://:0:0:0:0 | <none> |
|
||||
| variables.kt:5:20:5:29 | param | file://:0:0:0:0 | int | file://:0:0:0:0 | <none> |
|
||||
| variables.kt:6:9:6:25 | int local | file://:0:0:0:0 | int | variables.kt:6:21:6:25 | ... + ... |
|
||||
| variables.kt:10:1:10:21 | topLevel | file://:0:0:0:0 | int | file://:0:0:0:0 | <none> |
|
||||
|
||||
@@ -7,5 +7,5 @@ class Foo {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: val topLevel: Int = 1
|
||||
val topLevel: Int = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user