[IR] Add test for KT-47767
This commit is contained in:
committed by
teamcityserver
parent
4733a0d970
commit
f644f47360
+6
@@ -1133,6 +1133,12 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
|
|||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("doubleBoundToThis.kt")
|
||||||
|
public void testDoubleBoundToThis() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/doubleBoundToThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("emptyLhsFunction.kt")
|
@TestMetadata("emptyLhsFunction.kt")
|
||||||
public void testEmptyLhsFunction() throws Exception {
|
public void testEmptyLhsFunction() throws Exception {
|
||||||
|
|||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
// SKIP_SOURCEMAP_REMAPPING
|
||||||
|
// KT-47767
|
||||||
|
|
||||||
|
// FILE: 1.kt
|
||||||
|
|
||||||
|
public typealias LoggingFunctionType<T> = () -> T
|
||||||
|
|
||||||
|
inline fun testLoggingPassThough(loggerMethod: LoggingFunctionType<String>): String {
|
||||||
|
return loggerMethod() + loggerMethod() // if this call is commented the issue doesn't reproduce
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
|
||||||
|
class LLoggerTest {
|
||||||
|
private var i = 0
|
||||||
|
fun testDebugTag(): String {
|
||||||
|
return testLoggingPassThough(
|
||||||
|
::forRef
|
||||||
|
)
|
||||||
|
}
|
||||||
|
private fun forRef(): String {
|
||||||
|
if (i == 0) {
|
||||||
|
i++
|
||||||
|
return "O"
|
||||||
|
}
|
||||||
|
return "K"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
|
||||||
|
return LLoggerTest().testDebugTag()
|
||||||
|
}
|
||||||
+6
@@ -1133,6 +1133,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
|||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("doubleBoundToThis.kt")
|
||||||
|
public void testDoubleBoundToThis() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/doubleBoundToThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("emptyLhsFunction.kt")
|
@TestMetadata("emptyLhsFunction.kt")
|
||||||
public void testEmptyLhsFunction() throws Exception {
|
public void testEmptyLhsFunction() throws Exception {
|
||||||
|
|||||||
+6
@@ -1133,6 +1133,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
|||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("doubleBoundToThis.kt")
|
||||||
|
public void testDoubleBoundToThis() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/doubleBoundToThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("emptyLhsFunction.kt")
|
@TestMetadata("emptyLhsFunction.kt")
|
||||||
public void testEmptyLhsFunction() throws Exception {
|
public void testEmptyLhsFunction() throws Exception {
|
||||||
|
|||||||
+6
@@ -1133,6 +1133,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
|||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("doubleBoundToThis.kt")
|
||||||
|
public void testDoubleBoundToThis() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/doubleBoundToThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("emptyLhsFunction.kt")
|
@TestMetadata("emptyLhsFunction.kt")
|
||||||
public void testEmptyLhsFunction() throws Exception {
|
public void testEmptyLhsFunction() throws Exception {
|
||||||
|
|||||||
+6
@@ -1133,6 +1133,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
|||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("doubleBoundToThis.kt")
|
||||||
|
public void testDoubleBoundToThis() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/doubleBoundToThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("emptyLhsFunction.kt")
|
@TestMetadata("emptyLhsFunction.kt")
|
||||||
public void testEmptyLhsFunction() throws Exception {
|
public void testEmptyLhsFunction() throws Exception {
|
||||||
|
|||||||
+6
@@ -1133,6 +1133,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab
|
|||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("doubleBoundToThis.kt")
|
||||||
|
public void testDoubleBoundToThis() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/doubleBoundToThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("emptyLhsFunction.kt")
|
@TestMetadata("emptyLhsFunction.kt")
|
||||||
public void testEmptyLhsFunction() throws Exception {
|
public void testEmptyLhsFunction() throws Exception {
|
||||||
|
|||||||
+6
@@ -1133,6 +1133,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
|
|||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("doubleBoundToThis.kt")
|
||||||
|
public void testDoubleBoundToThis() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/doubleBoundToThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("emptyLhsFunction.kt")
|
@TestMetadata("emptyLhsFunction.kt")
|
||||||
public void testEmptyLhsFunction() throws Exception {
|
public void testEmptyLhsFunction() throws Exception {
|
||||||
|
|||||||
+6
@@ -1133,6 +1133,12 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
|
|||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("doubleBoundToThis.kt")
|
||||||
|
public void testDoubleBoundToThis() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/doubleBoundToThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("emptyLhsFunction.kt")
|
@TestMetadata("emptyLhsFunction.kt")
|
||||||
public void testEmptyLhsFunction() throws Exception {
|
public void testEmptyLhsFunction() throws Exception {
|
||||||
|
|||||||
+5
@@ -858,6 +858,11 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
|
|||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("doubleBoundToThis.kt")
|
||||||
|
public void testDoubleBoundToThis() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/doubleBoundToThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("emptyLhsFunction.kt")
|
@TestMetadata("emptyLhsFunction.kt")
|
||||||
public void testEmptyLhsFunction() throws Exception {
|
public void testEmptyLhsFunction() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt");
|
||||||
|
|||||||
Generated
+5
@@ -858,6 +858,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
|||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("doubleBoundToThis.kt")
|
||||||
|
public void testDoubleBoundToThis() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/doubleBoundToThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("emptyLhsFunction.kt")
|
@TestMetadata("emptyLhsFunction.kt")
|
||||||
public void testEmptyLhsFunction() throws Exception {
|
public void testEmptyLhsFunction() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt");
|
||||||
|
|||||||
Generated
+5
@@ -858,6 +858,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
|
|||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("doubleBoundToThis.kt")
|
||||||
|
public void testDoubleBoundToThis() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/doubleBoundToThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("emptyLhsFunction.kt")
|
@TestMetadata("emptyLhsFunction.kt")
|
||||||
public void testEmptyLhsFunction() throws Exception {
|
public void testEmptyLhsFunction() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt");
|
runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user