Retain Member.getInitializer for Kotlin programs

I opt to identify any syntactic initializer. These are broader in scope than Java's member initializers, which are necessarily context-free, whereas in Kotlin the primary constructor's parameters can be referred to.
This commit is contained in:
Chris Smowton
2022-03-01 12:20:02 +00:00
committed by Ian Lynagh
parent 37543e7a86
commit 13cd145a76
6 changed files with 31 additions and 1 deletions

View File

@@ -500,6 +500,7 @@ open class KotlinFileExtractor(
tw.writeHasLocation(assignmentId, declLocId)
tw.writeCallableEnclosingExpr(assignmentId, constructorId)
tw.writeStatementEnclosingExpr(assignmentId, stmtId)
tw.writeKtInitializerAssignment(assignmentId)
val lhsId = tw.getFreshIdLabel<DbVaraccess>()
val lhsType = useType(backingField.type)