Don't generate getter for synthetic Obj-C class companion (#3700)
This commit is contained in:
committed by
GitHub
parent
a2fc16eb17
commit
cb226dfff1
+2
-1
@@ -777,8 +777,9 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
|
||||
context.llvm.staticData.createConstKotlinObject(declaration,
|
||||
*computeFields(declaration)).llvm else codegen.kNullObjHeaderPtr)
|
||||
}
|
||||
val isObjCCompanion = declaration.isCompanion && declaration.parentAsClass.isObjCClass()
|
||||
// If can be exported and can be instantiated.
|
||||
if (declaration.isExported() &&
|
||||
if (declaration.isExported() && !isObjCCompanion &&
|
||||
declaration.constructors.singleOrNull() { it.valueParameters.size == 0 } != null) {
|
||||
val valueGetterName = declaration.objectInstanceGetterSymbolName
|
||||
generateFunction(codegen,
|
||||
|
||||
Reference in New Issue
Block a user