Skip to content

Commit 7185118

Browse files
committed
Kotlin: More top-level stuff
1 parent 4ba44c0 commit 7185118

6 files changed

Lines changed: 8 additions & 6 deletions

File tree

java/kotlin-extractor/src/main/kotlin/KotlinExtractorExtension.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ class KotlinFileExtractor(val logger: Logger, val tw: TrapWriter) {
386386
return id
387387
}
388388

389-
fun extractProperty(p: IrProperty, parentid: Label<out DbPackage_or_reftype>) {
389+
fun extractProperty(p: IrProperty, parentid: Label<out DbReftype>) {
390390
val bf = p.backingField
391391
if(bf == null) {
392392
logger.warn("IrProperty without backing field")

java/ql/lib/config/semmlecode.dbscheme

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ fields(
323323
unique int id: @field,
324324
string nodeName: string ref,
325325
int typeid: @type ref,
326-
int parentid: @package_or_reftype ref,
326+
int parentid: @reftype ref,
327327
int sourceid: @field ref
328328
);
329329

@@ -336,8 +336,6 @@ constrs(
336336
int sourceid: @constructor ref
337337
);
338338

339-
@package_or_reftype = @package | @reftype
340-
341339
methods(
342340
unique int id: @method,
343341
string nodeName: string ref,

java/ql/test/kotlin/library-tests/methods/exprs.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
| methods.kt:10:9:10:25 | this |
33
| methods.kt:10:21:10:21 | a |
44
| methods.kt:10:24:10:24 | 3 |
5+
| methods.kt:11:9:11:28 | topLevelMethod(...) |
6+
| methods.kt:11:24:11:24 | b |
7+
| methods.kt:11:27:11:27 | 4 |

java/ql/test/kotlin/library-tests/methods/methods.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Class {
88

99
fun anotherClassMethod(a: Int, b: Int) {
1010
classMethod(a, 3)
11-
// TODO topLevelMethod(b, 4)
11+
topLevelMethod(b, 4)
1212
}
1313
}
1414

java/ql/test/kotlin/library-tests/variables/variables.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
| variables.kt:3:5:3:21 | prop | file://:0:0:0:0 | int | file://:0:0:0:0 | <none> |
55
| variables.kt:5:20:5:29 | param | file://:0:0:0:0 | int | file://:0:0:0:0 | <none> |
66
| variables.kt:6:9:6:25 | int local | file://:0:0:0:0 | int | variables.kt:6:21:6:25 | ... + ... |
7+
| variables.kt:10:1:10:21 | topLevel | file://:0:0:0:0 | int | file://:0:0:0:0 | <none> |

java/ql/test/kotlin/library-tests/variables/variables.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ class Foo {
77
}
88
}
99

10-
// TODO: val topLevel: Int = 1
10+
val topLevel: Int = 1
1111

0 commit comments

Comments
 (0)