diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/KotlinUtils.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/KotlinUtils.kt index ac3eb2ba399..beeddadcafe 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/KotlinUtils.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/KotlinUtils.kt @@ -82,4 +82,6 @@ fun KotlinBuiltIns.findSingleFunction(name: Name): FunctionDescriptor = builtInsPackageScope.findSingleFunction(name) val PsiElement?.startOffsetOrUndefined get() = this?.startOffset ?: UNDEFINED_OFFSET -val PsiElement?.endOffsetOrUndefined get() = this?.endOffset ?: UNDEFINED_OFFSET \ No newline at end of file +val PsiElement?.endOffsetOrUndefined get() = this?.endOffset ?: UNDEFINED_OFFSET + + diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/StableDescriptorsComparator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/StableDescriptorsComparator.kt new file mode 100644 index 00000000000..267694fc9cf --- /dev/null +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/StableDescriptorsComparator.kt @@ -0,0 +1,45 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.psi2ir + +import org.jetbrains.kotlin.descriptors.DeclarationDescriptor +import org.jetbrains.kotlin.renderer.ClassifierNamePolicy +import org.jetbrains.kotlin.renderer.DescriptorRenderer +import org.jetbrains.kotlin.renderer.DescriptorRendererModifier +import org.jetbrains.kotlin.renderer.OverrideRenderingPolicy +import java.util.* + +object StableDescriptorsComparator : Comparator { + override fun compare(member1: DeclarationDescriptor?, member2: DeclarationDescriptor?): Int { + if (member1 == member2) return 0 + if (member1 == null) return -1 + if (member2 == null) return 1 + + val image1 = DESCRIPTOR_RENDERER.render(member1) + val image2 = DESCRIPTOR_RENDERER.render(member2) + return image1.compareTo(image2) + } + + private val DESCRIPTOR_RENDERER = DescriptorRenderer.withOptions { + withDefinedIn = false + overrideRenderingPolicy = OverrideRenderingPolicy.RENDER_OPEN_OVERRIDE + includePropertyConstant = true + classifierNamePolicy = ClassifierNamePolicy.FULLY_QUALIFIED + verbose = true + modifiers = DescriptorRendererModifier.ALL + } +} \ No newline at end of file diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt index ec688f859aa..61898c8981f 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt @@ -28,16 +28,12 @@ import org.jetbrains.kotlin.psi.KtDelegatedSuperTypeEntry import org.jetbrains.kotlin.psi.KtEnumEntry import org.jetbrains.kotlin.psi.psiUtil.endOffset import org.jetbrains.kotlin.psi.psiUtil.startOffset -import org.jetbrains.kotlin.renderer.ClassifierNamePolicy -import org.jetbrains.kotlin.renderer.DescriptorRenderer -import org.jetbrains.kotlin.renderer.DescriptorRendererModifier -import org.jetbrains.kotlin.renderer.OverrideRenderingPolicy +import org.jetbrains.kotlin.psi2ir.StableDescriptorsComparator import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.DescriptorUtils import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter import org.jetbrains.kotlin.utils.addToStdlib.safeAs import java.lang.AssertionError -import java.util.* class ClassGenerator(declarationGenerator: DeclarationGenerator) : DeclarationGeneratorExtension(declarationGenerator) { fun generateClass(ktClassOrObject: KtClassOrObject): IrClass { @@ -84,40 +80,19 @@ class ClassGenerator(declarationGenerator: DeclarationGenerator) : DeclarationGe it?.kind == CallableMemberDescriptor.Kind.FAKE_OVERRIDE } } - .sortedWith(StableCallableMembersComparator) + .sortedWith(StableDescriptorsComparator) .forEach { fakeOverride -> irClass.addMember(declarationGenerator.generateFakeOverrideDeclaration(fakeOverride, ktClassOrObject)) } } - private object StableCallableMembersComparator : Comparator { - override fun compare(member1: CallableMemberDescriptor?, member2: CallableMemberDescriptor?): Int { - if (member1 == member2) return 0 - if (member1 == null) return -1 - if (member2 == null) return 1 - - val image1 = DESCRIPTOR_RENDERER.render(member1) - val image2 = DESCRIPTOR_RENDERER.render(member2) - return image1.compareTo(image2) - } - - private val DESCRIPTOR_RENDERER = DescriptorRenderer.withOptions { - withDefinedIn = false - overrideRenderingPolicy = OverrideRenderingPolicy.RENDER_OPEN_OVERRIDE - includePropertyConstant = true - classifierNamePolicy = ClassifierNamePolicy.FULLY_QUALIFIED - verbose = true - modifiers = DescriptorRendererModifier.ALL - } - } - private fun generateMembersDeclaredInSupertypeList(irClass: IrClass, ktClassOrObject: KtClassOrObject) { ktClassOrObject.getSuperTypeList()?.let { ktSuperTypeList -> val delegatedMembers = irClass.descriptor.unsubstitutedMemberScope .getContributedDescriptors(DescriptorKindFilter.CALLABLES) .filterIsInstance() .filter { it.kind == CallableMemberDescriptor.Kind.DELEGATION } - .sortedWith(StableCallableMembersComparator) + .sortedWith(StableDescriptorsComparator) if (delegatedMembers.isEmpty()) return for (ktEntry in ktSuperTypeList.entries) { diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ModuleDependenciesGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ModuleDependenciesGenerator.kt index a0ecbc42dec..31abd27eebb 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ModuleDependenciesGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ModuleDependenciesGenerator.kt @@ -24,6 +24,7 @@ import org.jetbrains.kotlin.ir.declarations.impl.IrPropertyImpl import org.jetbrains.kotlin.ir.declarations.impl.IrTypeParameterImpl import org.jetbrains.kotlin.ir.declarations.impl.IrValueParameterImpl import org.jetbrains.kotlin.ir.symbols.IrSymbol +import org.jetbrains.kotlin.psi2ir.StableDescriptorsComparator import org.jetbrains.kotlin.resolve.DescriptorUtils import org.jetbrains.kotlin.resolve.scopes.MemberScope @@ -124,7 +125,7 @@ class ModuleDependenciesGenerator(override val context: GeneratorContext) : Gene } private fun MemberScope.generateChildStubs(irParent: IrDeclarationContainer) { - getContributedDescriptors().generateChildStubs(irParent) + getContributedDescriptors().sortedWith(StableDescriptorsComparator).generateChildStubs (irParent) } private fun Collection.generateChildStubs(irParent: IrDeclarationContainer) { diff --git a/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.kt b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.kt new file mode 100644 index 00000000000..983bcfae575 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.kt @@ -0,0 +1,4 @@ +// !DUMP_DEPENDENCIES + +fun with1(receiver: Any?, block: Any?.() -> Unit) = block(receiver) +fun with2(receiver: Any?, block: Any?.() -> Unit) = receiver.block() \ No newline at end of file diff --git a/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt new file mode 100644 index 00000000000..fc2c99e2e80 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt @@ -0,0 +1,17 @@ +FILE /extFunInvokeAsFun.kt + FUN public fun with1(receiver: kotlin.Any?, block: kotlin.Any?.() -> kotlin.Unit): kotlin.Unit + VALUE_PARAMETER value-parameter receiver: kotlin.Any? + VALUE_PARAMETER value-parameter block: kotlin.Any?.() -> kotlin.Unit + BLOCK_BODY + RETURN type=kotlin.Nothing from='with1(Any?, Any?.() -> Unit): Unit' + CALL 'invoke(Any?): Unit' type=kotlin.Unit origin=INVOKE + $this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=kotlin.Any?.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION + p1: GET_VAR 'value-parameter receiver: Any?' type=kotlin.Any? origin=null + FUN public fun with2(receiver: kotlin.Any?, block: kotlin.Any?.() -> kotlin.Unit): kotlin.Unit + VALUE_PARAMETER value-parameter receiver: kotlin.Any? + VALUE_PARAMETER value-parameter block: kotlin.Any?.() -> kotlin.Unit + BLOCK_BODY + RETURN type=kotlin.Nothing from='with2(Any?, Any?.() -> Unit): Unit' + CALL 'invoke() on Any?: Unit' type=kotlin.Unit origin=INVOKE + $this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=kotlin.Any?.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION + $receiver: GET_VAR 'value-parameter receiver: Any?' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/expressions/extFunInvokeAsFun__.txt b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun__.txt new file mode 100644 index 00000000000..b346f16e960 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun__.txt @@ -0,0 +1,11 @@ +MODULE_FRAGMENT + EXTERNAL_PACKAGE_FRAGMENT kotlin + CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE Function1 + TYPE_PARAMETER + TYPE_PARAMETER + FUN IR_EXTERNAL_DECLARATION_STUB public abstract operator fun invoke(p1: P1): R + VALUE_PARAMETER value-parameter p1: P1 + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun equals(other: kotlin.Any?): kotlin.Boolean + VALUE_PARAMETER value-parameter other: kotlin.Any? + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun hashCode(): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/stubs/simple__.txt b/compiler/testData/ir/irText/stubs/simple__.txt index f5b25b304b4..fb04f45ce57 100644 --- a/compiler/testData/ir/irText/stubs/simple__.txt +++ b/compiler/testData/ir/irText/stubs/simple__.txt @@ -2,16 +2,59 @@ MODULE_FRAGMENT EXTERNAL_PACKAGE_FRAGMENT kotlin CLASS IR_EXTERNAL_DECLARATION_STUB CLASS Int CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB private constructor Int() + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Byte): kotlin.Int + VALUE_PARAMETER value-parameter other: kotlin.Byte + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Double): kotlin.Double + VALUE_PARAMETER value-parameter other: kotlin.Double + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Float): kotlin.Float + VALUE_PARAMETER value-parameter other: kotlin.Float + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Int): kotlin.Int + VALUE_PARAMETER value-parameter other: kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Long): kotlin.Long + VALUE_PARAMETER value-parameter other: kotlin.Long + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Short): kotlin.Int + VALUE_PARAMETER value-parameter other: kotlin.Short + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Byte): kotlin.Int + VALUE_PARAMETER value-parameter other: kotlin.Byte + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Double): kotlin.Double + VALUE_PARAMETER value-parameter other: kotlin.Double + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Float): kotlin.Float + VALUE_PARAMETER value-parameter other: kotlin.Float + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Int): kotlin.Int + VALUE_PARAMETER value-parameter other: kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Long): kotlin.Long + VALUE_PARAMETER value-parameter other: kotlin.Long + FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Short): kotlin.Int + VALUE_PARAMETER value-parameter other: kotlin.Short + CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT companion object of Int + CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB private constructor Companion() + PROPERTY IR_EXTERNAL_DECLARATION_STUB public const final val MAX_VALUE: kotlin.Int = 2147483647 + FUN IR_EXTERNAL_DECLARATION_STUB public final fun (): kotlin.Int + PROPERTY IR_EXTERNAL_DECLARATION_STUB public const final val MIN_VALUE: kotlin.Int = -2147483648 + FUN IR_EXTERNAL_DECLARATION_STUB public final fun (): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun equals(other: kotlin.Any?): kotlin.Boolean + VALUE_PARAMETER value-parameter other: kotlin.Any? + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun hashCode(): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toString(): kotlin.String + FUN IR_EXTERNAL_DECLARATION_STUB public final fun inv(): kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB public final infix fun and(other: kotlin.Int): kotlin.Int VALUE_PARAMETER value-parameter other: kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public final infix fun or(other: kotlin.Int): kotlin.Int + VALUE_PARAMETER value-parameter other: kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public final infix fun shl(bitCount: kotlin.Int): kotlin.Int + VALUE_PARAMETER value-parameter bitCount: kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public final infix fun shr(bitCount: kotlin.Int): kotlin.Int + VALUE_PARAMETER value-parameter bitCount: kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public final infix fun ushr(bitCount: kotlin.Int): kotlin.Int + VALUE_PARAMETER value-parameter bitCount: kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public final infix fun xor(other: kotlin.Int): kotlin.Int + VALUE_PARAMETER value-parameter other: kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun compareTo(other: kotlin.Byte): kotlin.Int VALUE_PARAMETER value-parameter other: kotlin.Byte FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun compareTo(other: kotlin.Double): kotlin.Int VALUE_PARAMETER value-parameter other: kotlin.Double FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun compareTo(other: kotlin.Float): kotlin.Int VALUE_PARAMETER value-parameter other: kotlin.Float - FUN IR_EXTERNAL_DECLARATION_STUB public open override fun compareTo(other: kotlin.Int): kotlin.Int - VALUE_PARAMETER value-parameter other: kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun compareTo(other: kotlin.Long): kotlin.Int VALUE_PARAMETER value-parameter other: kotlin.Long FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun compareTo(other: kotlin.Short): kotlin.Int @@ -29,11 +72,7 @@ MODULE_FRAGMENT VALUE_PARAMETER value-parameter other: kotlin.Long FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun div(other: kotlin.Short): kotlin.Int VALUE_PARAMETER value-parameter other: kotlin.Short - FUN IR_EXTERNAL_DECLARATION_STUB public open override fun equals(other: kotlin.Any?): kotlin.Boolean - VALUE_PARAMETER value-parameter other: kotlin.Any? - FUN IR_EXTERNAL_DECLARATION_STUB public open override fun hashCode(): kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun inc(): kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB public final fun inv(): kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun minus(other: kotlin.Byte): kotlin.Int VALUE_PARAMETER value-parameter other: kotlin.Byte FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun minus(other: kotlin.Double): kotlin.Double @@ -46,20 +85,6 @@ MODULE_FRAGMENT VALUE_PARAMETER value-parameter other: kotlin.Long FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun minus(other: kotlin.Short): kotlin.Int VALUE_PARAMETER value-parameter other: kotlin.Short - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Byte): kotlin.Int - VALUE_PARAMETER value-parameter other: kotlin.Byte - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Double): kotlin.Double - VALUE_PARAMETER value-parameter other: kotlin.Double - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Float): kotlin.Float - VALUE_PARAMETER value-parameter other: kotlin.Float - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Int): kotlin.Int - VALUE_PARAMETER value-parameter other: kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Long): kotlin.Long - VALUE_PARAMETER value-parameter other: kotlin.Long - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.Deprecated public final operator fun mod(other: kotlin.Short): kotlin.Int - VALUE_PARAMETER value-parameter other: kotlin.Short - FUN IR_EXTERNAL_DECLARATION_STUB public final infix fun or(other: kotlin.Int): kotlin.Int - VALUE_PARAMETER value-parameter other: kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun plus(other: kotlin.Byte): kotlin.Int VALUE_PARAMETER value-parameter other: kotlin.Byte FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun plus(other: kotlin.Double): kotlin.Double @@ -80,22 +105,6 @@ MODULE_FRAGMENT VALUE_PARAMETER value-parameter other: kotlin.Long FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange VALUE_PARAMETER value-parameter other: kotlin.Short - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Byte): kotlin.Int - VALUE_PARAMETER value-parameter other: kotlin.Byte - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Double): kotlin.Double - VALUE_PARAMETER value-parameter other: kotlin.Double - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Float): kotlin.Float - VALUE_PARAMETER value-parameter other: kotlin.Float - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Int): kotlin.Int - VALUE_PARAMETER value-parameter other: kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Long): kotlin.Long - VALUE_PARAMETER value-parameter other: kotlin.Long - FUN IR_EXTERNAL_DECLARATION_STUB @kotlin.SinceKotlin public final operator fun rem(other: kotlin.Short): kotlin.Int - VALUE_PARAMETER value-parameter other: kotlin.Short - FUN IR_EXTERNAL_DECLARATION_STUB public final infix fun shl(bitCount: kotlin.Int): kotlin.Int - VALUE_PARAMETER value-parameter bitCount: kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB public final infix fun shr(bitCount: kotlin.Int): kotlin.Int - VALUE_PARAMETER value-parameter bitCount: kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun times(other: kotlin.Byte): kotlin.Int VALUE_PARAMETER value-parameter other: kotlin.Byte FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun times(other: kotlin.Double): kotlin.Double @@ -108,6 +117,10 @@ MODULE_FRAGMENT VALUE_PARAMETER value-parameter other: kotlin.Long FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun times(other: kotlin.Short): kotlin.Int VALUE_PARAMETER value-parameter other: kotlin.Short + FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun unaryMinus(): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun unaryPlus(): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun compareTo(other: kotlin.Int): kotlin.Int + VALUE_PARAMETER value-parameter other: kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toByte(): kotlin.Byte FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toChar(): kotlin.Char FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toDouble(): kotlin.Double @@ -115,20 +128,7 @@ MODULE_FRAGMENT FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toInt(): kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toLong(): kotlin.Long FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toShort(): kotlin.Short + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun equals(other: kotlin.Any?): kotlin.Boolean + VALUE_PARAMETER value-parameter other: kotlin.Any? + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun hashCode(): kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toString(): kotlin.String - FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun unaryMinus(): kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB public final operator fun unaryPlus(): kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB public final infix fun ushr(bitCount: kotlin.Int): kotlin.Int - VALUE_PARAMETER value-parameter bitCount: kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB public final infix fun xor(other: kotlin.Int): kotlin.Int - VALUE_PARAMETER value-parameter other: kotlin.Int - CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT companion object of Int - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB private constructor Companion() - PROPERTY IR_EXTERNAL_DECLARATION_STUB public const final val MAX_VALUE: kotlin.Int = 2147483647 - FUN IR_EXTERNAL_DECLARATION_STUB public final fun (): kotlin.Int - PROPERTY IR_EXTERNAL_DECLARATION_STUB public const final val MIN_VALUE: kotlin.Int = -2147483648 - FUN IR_EXTERNAL_DECLARATION_STUB public final fun (): kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB public open override fun equals(other: kotlin.Any?): kotlin.Boolean - VALUE_PARAMETER value-parameter other: kotlin.Any? - FUN IR_EXTERNAL_DECLARATION_STUB public open override fun hashCode(): kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toString(): kotlin.String diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index 21b89b51137..7e7a89b2fae 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -629,6 +629,12 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { doTest(fileName); } + @TestMetadata("extFunInvokeAsFun.kt") + public void testExtFunInvokeAsFun() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/extFunInvokeAsFun.kt"); + doTest(fileName); + } + @TestMetadata("extensionPropertyGetterCall.kt") public void testExtensionPropertyGetterCall() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.kt");