Don't extract static init when the class already contains an anonymous init

This commit is contained in:
Tony Torralba
2022-03-23 13:41:33 +01:00
committed by Ian Lynagh
parent 3920b64d62
commit 1926bef050
2 changed files with 5 additions and 4 deletions

View File

@@ -99,7 +99,8 @@ open class KotlinFileExtractor(
if (isExternalDeclaration(declaration)) {
extractExternalClassLater(declaration)
} else {
extractClassSource(declaration, true, true)
val extractStaticInit = declaration.declarations.none { it is IrAnonymousInitializer }
extractClassSource(declaration, true, extractStaticInit)
}
}
is IrFunction -> {