diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt index 1c9a2149eb3..01f6d5bd1ca 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt @@ -133,12 +133,6 @@ open class InlineLambdaSourceMapper( parent: SourceMapper, smap: SMAPAndMethodNode ) : NestedSourceMapper(parent, smap.sortedRanges, smap.classSMAP.sourceInfo) { - init { - assert(ranges.isNotEmpty()) { - "Mapping ranges should be presented in inline lambda: ${smap.node}" - } - } - override fun mapLineNumber(lineNumber: Int): Int { if (ranges.firstOrNull()?.contains(lineNumber) == true) { //don't remap origin lambda line numbers diff --git a/compiler/testData/codegen/boxInline/callableReference/kt35101.kt b/compiler/testData/codegen/boxInline/callableReference/kt35101.kt new file mode 100644 index 00000000000..601fa365d5e --- /dev/null +++ b/compiler/testData/codegen/boxInline/callableReference/kt35101.kt @@ -0,0 +1,14 @@ +// FILE: 1.kt +package test + +inline fun T.let2(block: (T) -> R): R { + return block(this) +} + +// FILE: 2.kt +import test.* + +fun box(): String { + val result = true.let2(Boolean::not) + return if (!result) "OK" else "fail" +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java index 8ddcb26d2f2..d302c41b8f5 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -799,6 +799,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @TestMetadata("kt35101.kt") + public void testKt35101() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); + } + @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index 69f971becaf..64fd496b5c4 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -799,6 +799,11 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @TestMetadata("kt35101.kt") + public void testKt35101() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); + } + @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java index 53bbbe3ab11..59da71a0256 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java @@ -799,6 +799,11 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @TestMetadata("kt35101.kt") + public void testKt35101() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); + } + @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index 0ed8dafa77c..9423f89a1e4 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -799,6 +799,11 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @TestMetadata("kt35101.kt") + public void testKt35101() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); + } + @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrCallableReferenceInlineTestsGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrCallableReferenceInlineTestsGenerated.java index 0ecc2266417..836890d7298 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrCallableReferenceInlineTestsGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrCallableReferenceInlineTestsGenerated.java @@ -69,6 +69,11 @@ public class IrCallableReferenceInlineTestsGenerated extends AbstractIrCallableR runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @TestMetadata("kt35101.kt") + public void testKt35101() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); + } + @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CallableReferenceInlineTestsGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CallableReferenceInlineTestsGenerated.java index 6fbbcc0bd54..043da35a8a5 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CallableReferenceInlineTestsGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CallableReferenceInlineTestsGenerated.java @@ -69,6 +69,11 @@ public class CallableReferenceInlineTestsGenerated extends AbstractCallableRefer runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @TestMetadata("kt35101.kt") + public void testKt35101() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); + } + @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt");