IR: IrConstructor.isPrimary
NB this is required for Kotlin/JS.
This commit is contained in:
@@ -25,5 +25,7 @@ interface IrConstructor : IrFunction, IrSymbolDeclaration<IrConstructorSymbol> {
|
||||
get() = IrDeclarationKind.CONSTRUCTOR
|
||||
|
||||
override val descriptor: ClassConstructorDescriptor
|
||||
|
||||
val isPrimary: Boolean
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -35,7 +35,8 @@ class IrConstructorImpl(
|
||||
visibility: Visibility,
|
||||
returnType: KotlinType,
|
||||
isInline: Boolean,
|
||||
isExternal: Boolean
|
||||
isExternal: Boolean,
|
||||
override val isPrimary: Boolean
|
||||
) :
|
||||
IrFunctionBase(startOffset, endOffset, origin, visibility, isInline, isExternal, returnType),
|
||||
IrConstructor {
|
||||
@@ -51,7 +52,8 @@ class IrConstructorImpl(
|
||||
symbol.descriptor.visibility,
|
||||
symbol.descriptor.returnType,
|
||||
symbol.descriptor.isInline,
|
||||
symbol.descriptor.isEffectivelyExternal()
|
||||
symbol.descriptor.isEffectivelyExternal(),
|
||||
symbol.descriptor.isPrimary
|
||||
) {
|
||||
this.body = body
|
||||
}
|
||||
|
||||
@@ -94,7 +94,8 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
|
||||
private fun IrConstructor.renderConstructorFlags() =
|
||||
renderFlagsList(
|
||||
"inline".takeIf { isInline },
|
||||
"external".takeIf { isExternal }
|
||||
"external".takeIf { isExternal },
|
||||
"primary".takeIf { isPrimary }
|
||||
)
|
||||
|
||||
override fun visitProperty(declaration: IrProperty, data: Nothing?): String =
|
||||
|
||||
Reference in New Issue
Block a user