Propagate isExternal flag in Psi2Ir and deserializer
This commit is contained in:
committed by
TeamCityServer
parent
027f656790
commit
b0e0e62c0b
+16
-13
@@ -16,6 +16,7 @@ import org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl
|
||||
import org.jetbrains.kotlin.ir.symbols.impl.IrFileSymbolImpl
|
||||
import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable
|
||||
import org.jetbrains.kotlin.ir.util.isEffectivelyExternal
|
||||
import org.jetbrains.kotlin.ir.util.render
|
||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
|
||||
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
@@ -48,7 +49,7 @@ private fun isBuiltInClass(declaration: IrDeclaration): Boolean =
|
||||
fun moveBodilessDeclarationsToSeparatePlace(context: JsIrBackendContext, moduleFragment: IrModuleFragment) {
|
||||
MoveBodilessDeclarationsToSeparatePlaceLowering(context).let { moveBodiless ->
|
||||
moduleFragment.files.forEach {
|
||||
markExternalDeclarations(it)
|
||||
validateIsExternal(it)
|
||||
moveBodiless.lower(it)
|
||||
}
|
||||
}
|
||||
@@ -114,29 +115,31 @@ class MoveBodilessDeclarationsToSeparatePlaceLowering(private val context: JsIrB
|
||||
}
|
||||
}
|
||||
|
||||
fun markExternalDeclarations(packageFragment: IrPackageFragment) {
|
||||
fun validateIsExternal(packageFragment: IrPackageFragment) {
|
||||
for (declaration in packageFragment.declarations) {
|
||||
if (declaration is IrPossiblyExternalDeclaration) {
|
||||
if (declaration.isExternal) {
|
||||
markNestedExternalDeclarations(declaration)
|
||||
}
|
||||
}
|
||||
validateNestedExternalDeclarations(declaration, (declaration as? IrPossiblyExternalDeclaration)?.isExternal ?: false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun markNestedExternalDeclarations(declaration: IrDeclaration) {
|
||||
fun validateNestedExternalDeclarations(declaration: IrDeclaration, isExternalTopLevel: Boolean) {
|
||||
fun IrPossiblyExternalDeclaration.checkExternal() {
|
||||
if (isExternal != isExternalTopLevel) {
|
||||
throw error("isExternal validation failed for declaration ${declaration.render()}")
|
||||
}
|
||||
}
|
||||
|
||||
if (declaration is IrPossiblyExternalDeclaration) {
|
||||
declaration.isExternal = true
|
||||
declaration.checkExternal()
|
||||
}
|
||||
if (declaration is IrProperty) {
|
||||
declaration.getter?.isExternal = true
|
||||
declaration.setter?.isExternal = true
|
||||
declaration.backingField?.isExternal = true
|
||||
declaration.getter?.checkExternal()
|
||||
declaration.setter?.checkExternal()
|
||||
declaration.backingField?.checkExternal()
|
||||
}
|
||||
if (declaration is IrClass) {
|
||||
declaration.declarations.forEach {
|
||||
markNestedExternalDeclarations(it)
|
||||
validateNestedExternalDeclarations(it, isExternalTopLevel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -189,7 +189,7 @@ class StandaloneDeclarationGenerator(private val context: GeneratorContext) {
|
||||
val irFunction = with(descriptor) {
|
||||
irFactory.createFunction(
|
||||
startOffset, endOffset, origin, symbol, name, visibility, modality, IrUninitializedType,
|
||||
isInline, isExternal, isTailrec, isSuspend, isOperator, isInfix, isExpect
|
||||
isInline, isEffectivelyExternal(), isTailrec, isSuspend, isOperator, isInfix, isExpect
|
||||
)
|
||||
}
|
||||
irFunction.metadata = DescriptorMetadataSource.Function(descriptor)
|
||||
|
||||
@@ -382,7 +382,7 @@ class IrFunctionFactory(private val irBuiltIns: IrBuiltIns, private val symbolTa
|
||||
descriptor.run {
|
||||
irFactory.createFunction(
|
||||
offset, offset, memberOrigin, it, name, visibility, modality, returnType,
|
||||
isInline, isExternal, isTailrec, isSuspend, isOperator, isInfix, isExpect, true
|
||||
isInline, isEffectivelyExternal(), isTailrec, isSuspend, isOperator, isInfix, isExpect, true
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+8
-1
@@ -26,7 +26,7 @@ class DeepCopyIrTreeWithSymbolsForFakeOverrides(typeArguments: Map<IrTypeParamet
|
||||
|
||||
// Make symbol remapper aware of the callsite's type arguments.
|
||||
// Copy IR.
|
||||
val result = irElement.transform(copier, data = null)
|
||||
val result = irElement.transform(if (parent.isEffectivelyExternal()) copierMakingExternal else copier, data = null)
|
||||
|
||||
result.patchDeclarationParents(parent)
|
||||
return result
|
||||
@@ -94,4 +94,11 @@ class DeepCopyIrTreeWithSymbolsForFakeOverrides(typeArguments: Map<IrTypeParamet
|
||||
FakeOverrideTypeRemapper(symbolRemapper, typeArguments),
|
||||
SymbolRenamer.DEFAULT
|
||||
)
|
||||
|
||||
private val copierMakingExternal = FakeOverrideCopier(
|
||||
symbolRemapper,
|
||||
FakeOverrideTypeRemapper(symbolRemapper, typeArguments),
|
||||
SymbolRenamer.DEFAULT,
|
||||
makeExternal = true,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -11,7 +11,8 @@ import org.jetbrains.kotlin.ir.util.*
|
||||
class FakeOverrideCopier(
|
||||
private val symbolRemapper: SymbolRemapper,
|
||||
private val typeRemapper: TypeRemapper,
|
||||
private val symbolRenamer: SymbolRenamer
|
||||
private val symbolRenamer: SymbolRenamer,
|
||||
private val makeExternal: Boolean = false,
|
||||
) : DeepCopyIrTreeWithSymbols(symbolRemapper, typeRemapper, symbolRenamer) {
|
||||
|
||||
private fun <T : IrFunction> T.transformFunctionChildren(declaration: T): T =
|
||||
@@ -55,7 +56,7 @@ class FakeOverrideCopier(
|
||||
declaration.modality,
|
||||
declaration.returnType,
|
||||
isInline = declaration.isInline,
|
||||
isExternal = false,
|
||||
isExternal = makeExternal,
|
||||
isTailrec = declaration.isTailrec,
|
||||
isSuspend = declaration.isSuspend,
|
||||
isExpect = declaration.isExpect,
|
||||
@@ -78,7 +79,7 @@ class FakeOverrideCopier(
|
||||
isLateinit = declaration.isLateinit,
|
||||
isDelegated = declaration.isDelegated,
|
||||
isExpect = declaration.isExpect,
|
||||
isExternal = false
|
||||
isExternal = makeExternal
|
||||
).apply {
|
||||
transformAnnotations(declaration)
|
||||
this.getter = declaration.getter?.transform()
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.jetbrains.kotlin.ir.declarations.DescriptorMetadataSource
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction
|
||||
import org.jetbrains.kotlin.ir.types.impl.IrUninitializedType
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.isEffectivelyExternal
|
||||
|
||||
@ObsoleteDescriptorBasedAPI
|
||||
fun SymbolTable.declareSimpleFunctionWithOverrides(
|
||||
@@ -23,7 +24,7 @@ fun SymbolTable.declareSimpleFunctionWithOverrides(
|
||||
with(descriptor) {
|
||||
irFactory.createFunction(
|
||||
startOffset, endOffset, origin, it, nameProvider.nameForDeclaration(this),
|
||||
visibility, modality, IrUninitializedType, isInline, isExternal, isTailrec, isSuspend, isOperator, isInfix, isExpect
|
||||
visibility, modality, IrUninitializedType, isInline, isEffectivelyExternal(), isTailrec, isSuspend, isOperator, isInfix, isExpect
|
||||
).also { declaration ->
|
||||
declaration.metadata = DescriptorMetadataSource.Function(this)
|
||||
}
|
||||
|
||||
+25
-8
@@ -189,6 +189,18 @@ class IrDeclarationDeserializer(
|
||||
}
|
||||
}
|
||||
|
||||
private var isEffectivelyExternal = false
|
||||
|
||||
private inline fun withExternalValue(value: Boolean, fn: () -> Unit) {
|
||||
val oldExternalValue = isEffectivelyExternal
|
||||
isEffectivelyExternal = value
|
||||
try {
|
||||
fn()
|
||||
} finally {
|
||||
isEffectivelyExternal = oldExternalValue
|
||||
}
|
||||
}
|
||||
|
||||
private inline fun <T> withDeserializedIrDeclarationBase(
|
||||
proto: ProtoDeclarationBase,
|
||||
block: (IrSymbol, IdSignature, Int, Int, IrDeclarationOrigin, Long) -> T
|
||||
@@ -287,7 +299,7 @@ class IrDeclarationDeserializer(
|
||||
flags.isCompanion,
|
||||
flags.isInner,
|
||||
flags.isData,
|
||||
flags.isExternal,
|
||||
flags.isExternal || isEffectivelyExternal,
|
||||
flags.isInline,
|
||||
flags.isExpect,
|
||||
flags.isFun,
|
||||
@@ -297,9 +309,11 @@ class IrDeclarationDeserializer(
|
||||
|
||||
superTypes = proto.superTypeList.map { deserializeIrType(it) }
|
||||
|
||||
proto.declarationList
|
||||
.filterNot { isSkippableFakeOverride(it, this) }
|
||||
.mapTo(declarations) { deserializeDeclaration(it) }
|
||||
withExternalValue(isExternal) {
|
||||
proto.declarationList
|
||||
.filterNot { isSkippableFakeOverride(it, this) }
|
||||
.mapTo(declarations) { deserializeDeclaration(it) }
|
||||
}
|
||||
|
||||
thisReceiver = deserializeIrValueParameter(proto.thisReceiver, -1)
|
||||
|
||||
@@ -484,7 +498,7 @@ class IrDeclarationDeserializer(
|
||||
flags.modality,
|
||||
IrUninitializedType,
|
||||
flags.isInline,
|
||||
flags.isExternal,
|
||||
flags.isExternal || isEffectivelyExternal,
|
||||
flags.isTailrec,
|
||||
flags.isSuspend,
|
||||
flags.isOperator,
|
||||
@@ -548,7 +562,7 @@ class IrDeclarationDeserializer(
|
||||
flags.visibility,
|
||||
IrUninitializedType,
|
||||
flags.isInline,
|
||||
flags.isExternal,
|
||||
flags.isExternal || isEffectivelyExternal,
|
||||
flags.isPrimary,
|
||||
flags.isExpect
|
||||
)
|
||||
@@ -570,7 +584,7 @@ class IrDeclarationDeserializer(
|
||||
type,
|
||||
flags.visibility,
|
||||
flags.isFinal,
|
||||
flags.isExternal,
|
||||
flags.isExternal || isEffectivelyExternal,
|
||||
flags.isStatic,
|
||||
)
|
||||
}.usingParent {
|
||||
@@ -615,7 +629,7 @@ class IrDeclarationDeserializer(
|
||||
flags.isConst,
|
||||
flags.isLateinit,
|
||||
flags.isDelegated,
|
||||
flags.isExternal,
|
||||
flags.isExternal || isEffectivelyExternal,
|
||||
flags.isExpect,
|
||||
flags.isFakeOverride
|
||||
)
|
||||
@@ -623,16 +637,19 @@ class IrDeclarationDeserializer(
|
||||
if (proto.hasGetter()) {
|
||||
getter = deserializeIrFunction(proto.getter).also {
|
||||
it.correspondingPropertySymbol = symbol
|
||||
it.isExternal = this.isExternal
|
||||
}
|
||||
}
|
||||
if (proto.hasSetter()) {
|
||||
setter = deserializeIrFunction(proto.setter).also {
|
||||
it.correspondingPropertySymbol = symbol
|
||||
it.isExternal = this.isExternal
|
||||
}
|
||||
}
|
||||
if (proto.hasBackingField()) {
|
||||
backingField = deserializeIrField(proto.backingField).also {
|
||||
it.correspondingPropertySymbol = symbol
|
||||
it.isExternal = this.isExternal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -23,9 +23,9 @@ open external class internal {
|
||||
|
||||
B = NestedExternalEnum()
|
||||
|
||||
fun values(): Array<NestedExternalEnum> /* Synthetic body for ENUM_VALUES */
|
||||
external fun values(): Array<NestedExternalEnum> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): NestedExternalEnum /* Synthetic body for ENUM_VALUEOF */
|
||||
external fun valueOf(value: String): NestedExternalEnum /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
|
||||
+33
-33
@@ -5,51 +5,51 @@ FILE fqName:events fileName:/kt38765.kt
|
||||
CLASS CLASS name:EventEmitterP modality:OPEN visibility:public [external] superTypes:[events.internal]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:events.internal.EventEmitterP
|
||||
CONSTRUCTOR visibility:public <> () returnType:events.internal.EventEmitterP [external,primary]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [external,fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in events.internal
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [external,fake_override,operator] declared in events.internal
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [external,fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in events.internal
|
||||
public open fun hashCode (): kotlin.Int [external,fake_override] declared in events.internal
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [external,fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String [fake_override] declared in events.internal
|
||||
public open fun toString (): kotlin.String [external,fake_override] declared in events.internal
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS CLASS name:EventEmitterS modality:OPEN visibility:public [external] superTypes:[events.internal]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:events.internal.EventEmitterS
|
||||
CONSTRUCTOR visibility:public <> (a:kotlin.Any) returnType:events.internal.EventEmitterS [external]
|
||||
VALUE_PARAMETER name:a index:0 type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [external,fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in events.internal
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [external,fake_override,operator] declared in events.internal
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [external,fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in events.internal
|
||||
public open fun hashCode (): kotlin.Int [external,fake_override] declared in events.internal
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [external,fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String [fake_override] declared in events.internal
|
||||
public open fun toString (): kotlin.String [external,fake_override] declared in events.internal
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS OBJECT name:NestedExternalObject modality:FINAL visibility:public [external] superTypes:[events.internal]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:events.internal.NestedExternalObject
|
||||
CONSTRUCTOR visibility:private <> () returnType:events.internal.NestedExternalObject [external,primary]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [external,fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in events.internal
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [external,fake_override,operator] declared in events.internal
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [external,fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in events.internal
|
||||
public open fun hashCode (): kotlin.Int [external,fake_override] declared in events.internal
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [external,fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String [fake_override] declared in events.internal
|
||||
public open fun toString (): kotlin.String [external,fake_override] declared in events.internal
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS ENUM_CLASS name:NestedExternalEnum modality:FINAL visibility:public [external] superTypes:[kotlin.Enum<events.internal.NestedExternalEnum>]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:events.internal.NestedExternalEnum
|
||||
@@ -60,70 +60,70 @@ FILE fqName:events fileName:/kt38765.kt
|
||||
ENUM_ENTRY name:B
|
||||
init: EXPRESSION_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [external,primary] declared in events.internal.NestedExternalEnum'
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>) returnType:kotlin.Any [fake_override]
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>) returnType:kotlin.Any [external,fake_override]
|
||||
overridden:
|
||||
protected final fun clone (): kotlin.Any declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<events.internal.NestedExternalEnum>
|
||||
FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>, other:events.internal.NestedExternalEnum) returnType:kotlin.Int [fake_override,operator]
|
||||
FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>, other:events.internal.NestedExternalEnum) returnType:kotlin.Int [external,fake_override,operator]
|
||||
overridden:
|
||||
public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<events.internal.NestedExternalEnum>
|
||||
VALUE_PARAMETER name:other index:0 type:events.internal.NestedExternalEnum
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>, other:kotlin.Any?) returnType:kotlin.Boolean [external,fake_override,operator]
|
||||
overridden:
|
||||
public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<events.internal.NestedExternalEnum>
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>) returnType:kotlin.Int [fake_override]
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>) returnType:kotlin.Int [external,fake_override]
|
||||
overridden:
|
||||
public final fun hashCode (): kotlin.Int declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<events.internal.NestedExternalEnum>
|
||||
PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [external,fake_override,val]
|
||||
FUN FAKE_OVERRIDE name:<get-name> visibility:public modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>) returnType:kotlin.String [fake_override]
|
||||
FUN FAKE_OVERRIDE name:<get-name> visibility:public modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>) returnType:kotlin.String [external,fake_override]
|
||||
correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [external,fake_override,val]
|
||||
overridden:
|
||||
public final fun <get-name> (): kotlin.String declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<events.internal.NestedExternalEnum>
|
||||
PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [external,fake_override,val]
|
||||
FUN FAKE_OVERRIDE name:<get-ordinal> visibility:public modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>) returnType:kotlin.Int [fake_override]
|
||||
FUN FAKE_OVERRIDE name:<get-ordinal> visibility:public modality:FINAL <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>) returnType:kotlin.Int [external,fake_override]
|
||||
correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [external,fake_override,val]
|
||||
overridden:
|
||||
public final fun <get-ordinal> (): kotlin.Int declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<events.internal.NestedExternalEnum>
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>) returnType:kotlin.String [fake_override]
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum<events.internal.NestedExternalEnum>) returnType:kotlin.String [external,fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<events.internal.NestedExternalEnum>
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<events.internal.NestedExternalEnum>
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<events.internal.NestedExternalEnum> [external]
|
||||
SYNTHETIC_BODY kind=ENUM_VALUES
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:events.internal.NestedExternalEnum
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:events.internal.NestedExternalEnum [external]
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
SYNTHETIC_BODY kind=ENUM_VALUEOF
|
||||
CLASS INTERFACE name:NestedExternalInterface modality:ABSTRACT visibility:public [external] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:events.internal.NestedExternalInterface
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [external,fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [external,fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [external,fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [external,fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [external,fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [external,fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
|
||||
@@ -2,13 +2,13 @@ package foo
|
||||
|
||||
open external class A {
|
||||
external constructor() /* primary */
|
||||
fun foo(): String
|
||||
external fun foo(): String
|
||||
|
||||
}
|
||||
|
||||
open external class B : A {
|
||||
external constructor() /* primary */
|
||||
fun bar(): String
|
||||
external fun bar(): String
|
||||
|
||||
}
|
||||
|
||||
|
||||
+18
-18
@@ -2,42 +2,42 @@ FILE fqName:foo fileName:/nativeNativeKotlin.kt
|
||||
CLASS CLASS name:A modality:OPEN visibility:public [external] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:foo.A
|
||||
CONSTRUCTOR visibility:public <> () returnType:foo.A [external,primary]
|
||||
FUN name:foo visibility:public modality:FINAL <> ($this:foo.A) returnType:kotlin.String
|
||||
FUN name:foo visibility:public modality:FINAL <> ($this:foo.A) returnType:kotlin.String [external]
|
||||
$this: VALUE_PARAMETER name:<this> type:foo.A
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [external,fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [external,fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [external,fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS CLASS name:B modality:OPEN visibility:public [external] superTypes:[foo.A]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:foo.B
|
||||
CONSTRUCTOR visibility:public <> () returnType:foo.B [external,primary]
|
||||
FUN name:bar visibility:public modality:FINAL <> ($this:foo.B) returnType:kotlin.String
|
||||
FUN name:bar visibility:public modality:FINAL <> ($this:foo.B) returnType:kotlin.String [external]
|
||||
$this: VALUE_PARAMETER name:<this> type:foo.B
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:FINAL <> ($this:foo.A) returnType:kotlin.String [fake_override]
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:FINAL <> ($this:foo.A) returnType:kotlin.String [external,fake_override]
|
||||
overridden:
|
||||
public final fun foo (): kotlin.String declared in foo.A
|
||||
public final fun foo (): kotlin.String [external] declared in foo.A
|
||||
$this: VALUE_PARAMETER name:<this> type:foo.A
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [external,fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in foo.A
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [external,fake_override,operator] declared in foo.A
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [external,fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in foo.A
|
||||
public open fun hashCode (): kotlin.Int [external,fake_override] declared in foo.A
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [external,fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String [fake_override] declared in foo.A
|
||||
public open fun toString (): kotlin.String [external,fake_override] declared in foo.A
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[foo.B]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:foo.C
|
||||
@@ -47,24 +47,24 @@ FILE fqName:foo fileName:/nativeNativeKotlin.kt
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[foo.B]'
|
||||
FUN FAKE_OVERRIDE name:bar visibility:public modality:FINAL <> ($this:foo.B) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public final fun bar (): kotlin.String declared in foo.B
|
||||
public final fun bar (): kotlin.String [external] declared in foo.B
|
||||
$this: VALUE_PARAMETER name:<this> type:foo.B
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:FINAL <> ($this:foo.A) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public final fun foo (): kotlin.String [fake_override] declared in foo.B
|
||||
public final fun foo (): kotlin.String [external,fake_override] declared in foo.B
|
||||
$this: VALUE_PARAMETER name:<this> type:foo.A
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in foo.B
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [external,fake_override,operator] declared in foo.B
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in foo.B
|
||||
public open fun hashCode (): kotlin.Int [external,fake_override] declared in foo.B
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String [fake_override] declared in foo.B
|
||||
public open fun toString (): kotlin.String [external,fake_override] declared in foo.B
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
|
||||
+1
-1
@@ -455,7 +455,7 @@ interface IrBuilderExtension {
|
||||
property.factory.createFunction(
|
||||
fieldSymbol.owner.startOffset, fieldSymbol.owner.endOffset, SERIALIZABLE_PLUGIN_ORIGIN, IrSimpleFunctionSymbolImpl(descriptor),
|
||||
name, visibility, modality, returnType!!.toIrType(),
|
||||
isInline, isExternal, isTailrec, isSuspend, isOperator, isInfix, isExpect
|
||||
isInline, isEffectivelyExternal(), isTailrec, isSuspend, isOperator, isInfix, isExpect
|
||||
)
|
||||
}.also { f ->
|
||||
generateOverriddenFunctionSymbols(f, compilerContext.symbolTable)
|
||||
|
||||
Reference in New Issue
Block a user