mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Kotlin: Fix property initialisers
This commit is contained in:
@@ -1228,15 +1228,12 @@ open class KotlinFileExtractor(
|
||||
tw.writeExprs_assignexpr(assignmentId, type.javaResult.id, type.kotlinResult.id, stmtId, 0)
|
||||
tw.writeHasLocation(assignmentId, declLocId)
|
||||
|
||||
/*
|
||||
TODO
|
||||
val lhsId = tw.getFreshIdLabel<DbVaraccess>()
|
||||
val lhsType = useType(backingField.type)
|
||||
tw.writeExprs_varaccess(lhsId, lhsType.javaResult.id, lhsType.kotlinResult.id, assignmentId, 0)
|
||||
tw.writeHasLocation(lhsId, declLocId)
|
||||
val vId = useProperty(decl) // todo: fix this. We should be assigning the field, and not the property
|
||||
val vId = useField(backingField)
|
||||
tw.writeVariableBinding(lhsId, vId)
|
||||
*/
|
||||
|
||||
extractExpressionExpr(initializer.expression, obinitId, assignmentId, 1)
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@
|
||||
| exprs.kt:64:1:66:1 | <obinit>(...) | MethodAccess |
|
||||
| exprs.kt:64:9:64:18 | ...=... | AssignExpr |
|
||||
| exprs.kt:64:9:64:18 | n | VarAccess |
|
||||
| exprs.kt:64:9:64:18 | n | VarAccess |
|
||||
| exprs.kt:65:27:65:31 | new C(...) | ClassInstanceExpr |
|
||||
| exprs.kt:65:29:65:30 | 42 | IntegerLiteral |
|
||||
| exprs.kt:68:1:68:18 | <obinit>(...) | MethodAccess |
|
||||
@@ -165,6 +166,7 @@
|
||||
| exprs.kt:92:1:96:1 | new Enum(...) | ClassInstanceExpr |
|
||||
| exprs.kt:92:18:92:29 | ...=... | AssignExpr |
|
||||
| exprs.kt:92:18:92:29 | rgb | VarAccess |
|
||||
| exprs.kt:92:18:92:29 | rgb | VarAccess |
|
||||
| exprs.kt:99:5:99:31 | south | LocalVariableDeclExpr |
|
||||
| exprs.kt:99:27:99:31 | SOUTH | VarAccess |
|
||||
| exprs.kt:100:5:100:27 | green | LocalVariableDeclExpr |
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
varAcc
|
||||
| variables.kt:3:5:3:21 | prop |
|
||||
| variables.kt:16:11:16:18 | o |
|
||||
| variables.kt:16:11:16:18 | o |
|
||||
instAcc
|
||||
| variables.kt:21:11:21:15 | this |
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
| variables.kt:2:1:8:1 | other | file://:0:0:0:0 | Object | file://:0:0:0:0 | <none> |
|
||||
| variables.kt:3:5:3:21 | prop | file://:0:0:0:0 | int | file://:0:0:0:0 | <none> |
|
||||
| variables.kt:3:5:3:21 | prop | file://:0:0:0:0 | int | variables.kt:3:21:3:21 | 1 |
|
||||
| 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> |
|
||||
| variables.kt:12:1:15:1 | other | file://:0:0:0:0 | Object | file://:0:0:0:0 | <none> |
|
||||
| variables.kt:16:1:34:1 | other | file://:0:0:0:0 | Object | file://:0:0:0:0 | <none> |
|
||||
| variables.kt:16:11:16:18 | o | variables.kt:12:1:15:1 | C1 | file://:0:0:0:0 | <none> |
|
||||
| variables.kt:16:11:16:18 | o | variables.kt:12:1:15:1 | C1 | file://:0:0:0:0 | <none> |
|
||||
| variables.kt:16:11:16:18 | o | variables.kt:12:1:15:1 | C1 | variables.kt:16:11:16:18 | o |
|
||||
| variables.kt:36:1:45:1 | other | file://:0:0:0:0 | Object | file://:0:0:0:0 | <none> |
|
||||
| variables.kt:38:11:44:5 | other | file://:0:0:0:0 | Object | file://:0:0:0:0 | <none> |
|
||||
|
||||
Reference in New Issue
Block a user