Add ktLocalFunction relation and tests for local and anonymous classes

This commit is contained in:
Tamas Vajk
2021-12-21 15:28:17 +01:00
committed by Ian Lynagh
parent e0bf7d8246
commit ef2795c88b
13 changed files with 238 additions and 0 deletions

View File

@@ -662,6 +662,8 @@ open class KotlinFileExtractor(
if (s.isLocalFunction()) {
val classId = extractGeneratedClass(s, listOf(pluginContext.irBuiltIns.anyType))
extractLocalTypeDeclStmt(classId, s, callable, parent, idx)
val ids = getLocallyVisibleFunctionLabels(s)
tw.writeKtLocalFunction(ids.function)
} else {
logger.warnElement(Severity.ErrorSevere, "Expected to find local function", s)
}