Fix catch clause location

This commit is contained in:
Tamas Vajk
2021-12-02 12:51:53 +01:00
committed by Ian Lynagh
parent 21af31f3ab
commit 161463ecae
8 changed files with 39 additions and 25 deletions

View File

@@ -1229,6 +1229,8 @@ open class KotlinFileExtractor(
for((catchIdx, catchClause) in e.catches.withIndex()) {
val catchId = tw.getFreshIdLabel<DbCatchclause>()
tw.writeStmts_catchclause(catchId, id, catchIdx, callable)
val catchLocId = tw.getLocation(catchClause)
tw.writeHasLocation(catchId, catchLocId)
extractTypeAccess(catchClause.catchParameter.type, callable, catchId, -1, catchClause.catchParameter, catchId)
extractVariableExpr(catchClause.catchParameter, callable, catchId, 0, catchId)
extractExpressionStmt(catchClause.result, callable, catchId, 1)