diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/FunctionCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/FunctionCodegen.kt index 928c90dbbb1..6cca1efc845 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/FunctionCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/FunctionCodegen.kt @@ -49,8 +49,7 @@ open class FunctionCodegen( val flags = calculateMethodFlags(functionView.isStatic) var methodVisitor = createMethod(flags, signature) - val hasSyntheticFlag = flags.and(Opcodes.ACC_SYNTHETIC) != 0 - if (state.generateParametersMetadata && !hasSyntheticFlag) { + if (state.generateParametersMetadata && flags.and(Opcodes.ACC_SYNTHETIC) == 0) { generateParameterNames(irFunction, methodVisitor, signature, state) } @@ -65,7 +64,7 @@ open class FunctionCodegen( // super constructor arguments, there shouldn't be any annotations on them other than @NonNull, // and those are meaningless on synthetic parameters. (Also, the inliner cannot handle them and // will throw an exception if we generate any.) - if (irFunction !is IrConstructor || (!hasSyntheticFlag && !irFunction.parentAsClass.isAnonymousObject)) { + if (irFunction !is IrConstructor || !irFunction.parentAsClass.isAnonymousObject) { generateParameterAnnotations(functionView, methodVisitor, signature, classCodegen, context) } diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/CallableReferenceLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/CallableReferenceLowering.kt index fc40697a0b8..b52c1f250fd 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/CallableReferenceLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/CallableReferenceLowering.kt @@ -38,6 +38,7 @@ import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.name.SpecialNames import org.jetbrains.kotlin.resolve.DescriptorUtils internal val callableReferencePhase = makeIrFilePhase( @@ -175,7 +176,7 @@ internal class CallableReferenceLowering(private val context: JvmBackendContext) // A callable reference results in a synthetic class, while a lambda is not synthetic. // We don't produce GENERATED_SAM_IMPLEMENTATION, which is always synthetic. origin = if (isLambda) JvmLoweredDeclarationOrigin.LAMBDA_IMPL else JvmLoweredDeclarationOrigin.FUNCTION_REFERENCE_IMPL - name = Name.special("") + name = SpecialNames.NO_NAME_PROVIDED }.apply { parent = currentDeclarationParent superTypes += superType diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/PropertyReferenceLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/PropertyReferenceLowering.kt index 6942a6edf37..66b9bd3c1a8 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/PropertyReferenceLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/PropertyReferenceLowering.kt @@ -33,6 +33,7 @@ import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid import org.jetbrains.kotlin.load.java.JavaVisibilities import org.jetbrains.kotlin.load.java.JvmAbi import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.name.SpecialNames import org.jetbrains.kotlin.types.Variance internal val propertyReferencePhase = makeIrFilePhase( @@ -227,7 +228,7 @@ internal class PropertyReferenceLowering(val context: JvmBackendContext) : Class val superClass = propertyReferenceKindFor(expression).interfaceSymbol.owner val referenceClass = buildClass { setSourceRange(expression) - name = Name.special("") + name = SpecialNames.NO_NAME_PROVIDED origin = JvmLoweredDeclarationOrigin.GENERATED_PROPERTY_REFERENCE visibility = Visibilities.LOCAL }.apply {