diff --git a/analysis/symbol-light-classes/src/org/jetbrains/kotlin/light/classes/symbol/classes/symbolLightClassUtils.kt b/analysis/symbol-light-classes/src/org/jetbrains/kotlin/light/classes/symbol/classes/symbolLightClassUtils.kt index 7e4dd46a5976f..6bf243256494c 100644 --- a/analysis/symbol-light-classes/src/org/jetbrains/kotlin/light/classes/symbol/classes/symbolLightClassUtils.kt +++ b/analysis/symbol-light-classes/src/org/jetbrains/kotlin/light/classes/symbol/classes/symbolLightClassUtils.kt @@ -168,7 +168,11 @@ internal fun SymbolLightClassBase.createConstructors( val primaryConstructor = constructors.singleOrNull { it.isPrimary } if (primaryConstructor != null && shouldGenerateNoArgOverload(primaryConstructor, constructors)) { result.add( - noArgConstructor(primaryConstructor.compilerVisibility.externalDisplayName, METHOD_INDEX_FOR_NO_ARG_OVERLOAD_CTOR) + noArgConstructor( + primaryConstructor.compilerVisibility.externalDisplayName, + primaryConstructor.sourcePsiSafe(), + METHOD_INDEX_FOR_NO_ARG_OVERLOAD_CTOR + ) ) } } @@ -198,14 +202,15 @@ private fun SymbolLightClassBase.defaultConstructor(): KtLightMethod { else -> PsiModifier.PUBLIC } - return noArgConstructor(visibility, METHOD_INDEX_FOR_DEFAULT_CTOR) + return noArgConstructor(visibility, classOrObject, METHOD_INDEX_FOR_DEFAULT_CTOR) } private fun SymbolLightClassBase.noArgConstructor( visibility: String, + declaration: KtDeclaration?, methodIndex: Int, ): KtLightMethod = SymbolLightNoArgConstructor( - kotlinOrigin?.let { + declaration?.let { LightMemberOriginForDeclaration( originalElement = it, originKind = JvmDeclarationOriginKind.OTHER, diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOff.fir.txt b/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOff.fir.txt index dede3b6eeeda9..b2fa28872c503 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOff.fir.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOff.fir.txt @@ -34,7 +34,7 @@ public enum Em { /** * public final class Foo : kotlin/Any { * - * // signature: (ZBCCSIJFDLjava/lang/String;[I[J[D[Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Class;LEm;[LEm;)V + * // signature: (ZBCCSIJFDLjava/lang/String;[I[J[DLkotlin/Array;Ljava/lang/Class;Lkotlin/Array;LEm;Lkotlin/Array;)V * public constructor(z: kotlin/Boolean (* = ... *), b: kotlin/Byte (* = ... *), c: kotlin/Char (* = ... *), c2: kotlin/Char (* = ... *), sh: kotlin/Short (* = ... *), i: kotlin/Int (* = ... *), l: kotlin/Long (* = ... *), f: kotlin/Float (* = ... *), d: kotlin/Double (* = ... *), s: kotlin/String (* = ... *), iarr: kotlin/IntArray (* = ... *), larr: kotlin/LongArray (* = ... *), darr: kotlin/DoubleArray (* = ... *), sarr: kotlin/Array (* = ... *), cl: java/lang/Class<*> (* = ... *), clarr: kotlin/Array> (* = ... *), em: Em (* = ... *), emarr: kotlin/Array (* = ... *)) * * // signature: foo(I)V diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOn.fir.txt b/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOn.fir.txt index 6a2c315db150f..0d5767a80e47e 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOn.fir.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOn.fir.txt @@ -34,7 +34,7 @@ public enum Em { /** * public final class Foo : kotlin/Any { * - * // signature: (ZBCCSIJFDLjava/lang/String;[I[J[D[Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Class;LEm;[LEm;)V + * // signature: (ZBCCSIJFDLjava/lang/String;[I[J[DLkotlin/Array;Ljava/lang/Class;Lkotlin/Array;LEm;Lkotlin/Array;)V * public constructor(z: kotlin/Boolean (* = ... *), b: kotlin/Byte (* = ... *), c: kotlin/Char (* = ... *), c2: kotlin/Char (* = ... *), sh: kotlin/Short (* = ... *), i: kotlin/Int (* = ... *), l: kotlin/Long (* = ... *), f: kotlin/Float (* = ... *), d: kotlin/Double (* = ... *), s: kotlin/String (* = ... *), iarr: kotlin/IntArray (* = ... *), larr: kotlin/LongArray (* = ... *), darr: kotlin/DoubleArray (* = ... *), sarr: kotlin/Array (* = ... *), cl: java/lang/Class<*> (* = ... *), clarr: kotlin/Array> (* = ... *), em: Em (* = ... *), emarr: kotlin/Array (* = ... *)) * * // signature: foo(I)V