[IR] Add test for KT-47767

This commit is contained in:
Roman Artemev
2021-09-29 15:19:09 +03:00
committed by teamcityserver
parent 4733a0d970
commit f644f47360
12 changed files with 96 additions and 0 deletions
@@ -1133,6 +1133,12 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
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
@TestMetadata("emptyLhsFunction.kt")
public void testEmptyLhsFunction() throws Exception {
@@ -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()
}
@@ -1133,6 +1133,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
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
@TestMetadata("emptyLhsFunction.kt")
public void testEmptyLhsFunction() throws Exception {
@@ -1133,6 +1133,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
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
@TestMetadata("emptyLhsFunction.kt")
public void testEmptyLhsFunction() throws Exception {
@@ -1133,6 +1133,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
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
@TestMetadata("emptyLhsFunction.kt")
public void testEmptyLhsFunction() throws Exception {
@@ -1133,6 +1133,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
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
@TestMetadata("emptyLhsFunction.kt")
public void testEmptyLhsFunction() throws Exception {
@@ -1133,6 +1133,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab
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
@TestMetadata("emptyLhsFunction.kt")
public void testEmptyLhsFunction() throws Exception {
@@ -1133,6 +1133,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
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
@TestMetadata("emptyLhsFunction.kt")
public void testEmptyLhsFunction() throws Exception {
@@ -1133,6 +1133,12 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
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
@TestMetadata("emptyLhsFunction.kt")
public void testEmptyLhsFunction() throws Exception {
@@ -858,6 +858,11 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
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")
public void testEmptyLhsFunction() throws Exception {
runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt");
@@ -858,6 +858,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
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")
public void testEmptyLhsFunction() throws Exception {
runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt");
@@ -858,6 +858,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
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")
public void testEmptyLhsFunction() throws Exception {
runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt");