Fix "kotlin.UninitializedPropertyAccessException: lateinit property typeTranslator has not been initialized" in Native IR serialization plugin
This commit is contained in:
+4
-3
@@ -45,9 +45,10 @@ import org.jetbrains.kotlinx.serialization.compiler.resolve.*
|
|||||||
val BackendContext.externalSymbols: ReferenceSymbolTable get() = ir.symbols.externalSymbolTable
|
val BackendContext.externalSymbols: ReferenceSymbolTable get() = ir.symbols.externalSymbolTable
|
||||||
|
|
||||||
internal fun BackendContext.createTypeTranslator(moduleDescriptor: ModuleDescriptor): TypeTranslator =
|
internal fun BackendContext.createTypeTranslator(moduleDescriptor: ModuleDescriptor): TypeTranslator =
|
||||||
TypeTranslator(externalSymbols, irBuiltIns.languageVersionSettings).apply {
|
TypeTranslator(externalSymbols, irBuiltIns.languageVersionSettings).apply {
|
||||||
constantValueGenerator = ConstantValueGenerator(moduleDescriptor, symbolTable = externalSymbols)
|
constantValueGenerator = ConstantValueGenerator(moduleDescriptor, symbolTable = externalSymbols)
|
||||||
}
|
constantValueGenerator.typeTranslator = this
|
||||||
|
}
|
||||||
|
|
||||||
interface IrBuilderExtension {
|
interface IrBuilderExtension {
|
||||||
val compilerContext: BackendContext
|
val compilerContext: BackendContext
|
||||||
|
|||||||
Reference in New Issue
Block a user