Kotlin: More top-level stuff

This commit is contained in:
Ian Lynagh
2021-08-17 16:42:52 +01:00
parent f0e2de1fa9
commit 4837e4e46a
6 changed files with 8 additions and 6 deletions

View File

@@ -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")

View File

@@ -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,

View File

@@ -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 |

View File

@@ -8,7 +8,7 @@ class Class {
fun anotherClassMethod(a: Int, b: Int) {
classMethod(a, 3)
// TODO topLevelMethod(b, 4)
topLevelMethod(b, 4)
}
}

View File

@@ -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> |

View File

@@ -7,5 +7,5 @@ class Foo {
}
}
// TODO: val topLevel: Int = 1
val topLevel: Int = 1