[IR BE] Support lateinit locals and isInitialized property
* update tests
This commit is contained in:
@@ -206,6 +206,14 @@ class JsIrBackendContext(
|
||||
NoLookupLocation.FROM_BACKEND
|
||||
).filterNot { it.isExpect }.single().getter!!
|
||||
)
|
||||
|
||||
override val lateinitIsInitializedPropertyGetter = symbolTable.referenceSimpleFunction(
|
||||
module.getPackage(kotlinPackageFqn).memberScope.getContributedVariables(
|
||||
Name.identifier("isInitialized"), NoLookupLocation.FROM_BACKEND
|
||||
).single {
|
||||
it.extensionReceiverParameter != null && !it.isExternal
|
||||
}.getter!!
|
||||
)
|
||||
}
|
||||
|
||||
override fun shouldGenerateHandlerParameterForDefaultBodyFun() = true
|
||||
|
||||
@@ -77,6 +77,7 @@ fun compile(
|
||||
ExpectDeclarationsRemoving(context).lower(moduleFragment)
|
||||
CoroutineIntrinsicLowering(context).lower(moduleFragment)
|
||||
ArrayInlineConstructorLowering(context).lower(moduleFragment)
|
||||
LateinitLowering(context, true).lower(moduleFragment)
|
||||
|
||||
val moduleFragmentCopy = moduleFragment.deepCopyWithSymbols()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user