diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.2.kt deleted file mode 100644 index dbc06a72b72..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - -abstract class A { - abstract fun getO() : R - - abstract fun getK() : R -} - - -inline fun doWork(job: ()-> R) : R { - return job() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt similarity index 72% rename from compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.1.kt rename to compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt index 35d62b85f2c..7a81294a751 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.1.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt @@ -1,3 +1,20 @@ +// FILE: 1.kt + +package test + +abstract class A { + abstract fun getO() : R + + abstract fun getK() : R +} + + +inline fun doWork(job: ()-> R) : R { + return job() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -26,4 +43,3 @@ fun box() : String { return "OK" } - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.2.kt deleted file mode 100644 index ad8abcf438d..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - -abstract class A(val param: R) { - abstract fun getO() : R - - abstract fun getK() : R -} - - -inline fun doWork(job: ()-> R) : R { - return job() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt similarity index 68% rename from compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.1.kt rename to compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt index a303896590c..bfbbb44d282 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.1.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt @@ -1,3 +1,20 @@ +// FILE: 1.kt + +package test + +abstract class A(val param: R) { + abstract fun getO() : R + + abstract fun getK() : R +} + + +inline fun doWork(job: ()-> R) : R { + return job() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -21,4 +38,4 @@ fun box() : String { if (result != "OK11") return "fail $result" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.1.kt deleted file mode 100644 index 555cf37409a..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.1.kt +++ /dev/null @@ -1,30 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun test1(): String { - val o = "O" - - val result = doWork ({o}, {"K"}, "GOOD") - - return result.getO() + result.getK() + result.getParam() -} - -fun test2() : String { - //same names as in object - val o1 = "O" - val k1 = "K" - - val result = doWorkInConstructor ({o1}, {k1}, "GOOD") - - return result.getO() + result.getK() + result.getParam() -} - -fun box() : String { - val result1 = test1(); - if (result1 != "OKGOOD") return "fail1 $result1" - - val result2 = test2(); - if (result2 != "OKGOOD") return "fail2 $result2" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt similarity index 59% rename from compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt index 8ff859bc931..9a8d1f21d2f 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test @@ -47,4 +49,37 @@ inline fun doWorkInConstructor(crossinline jobO: ()-> R, crossinline jobK: ( } } return s; -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun test1(): String { + val o = "O" + + val result = doWork ({o}, {"K"}, "GOOD") + + return result.getO() + result.getK() + result.getParam() +} + +fun test2() : String { + //same names as in object + val o1 = "O" + val k1 = "K" + + val result = doWorkInConstructor ({o1}, {k1}, "GOOD") + + return result.getO() + result.getK() + result.getParam() +} + +fun box() : String { + val result1 = test1(); + if (result1 != "OKGOOD") return "fail1 $result1" + + val result2 = test2(); + if (result2 != "OKGOOD") return "fail2 $result2" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.1.kt deleted file mode 100644 index 26bec3965f5..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.1.kt +++ /dev/null @@ -1,30 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun test1(): String { - val o = "O" - - val result = doWork ({o}, {"K"}, "11") - - return result.getO() + result.getK() + result.param -} - -fun test2() : String { - //same names as in object - val o1 = "O" - val k1 = "K" - val param = "11" - val result = doWorkInConstructor ({o1}, {k1}, {param}) - - return result.getO() + result.getK() + result.param -} - -fun box() : String { - val result1 = test1(); - if (result1 != "OK11") return "fail1 $result1" - - val result2 = test2(); - if (result2 != "OK11") return "fail2 $result2" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt similarity index 54% rename from compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt index 8579bdeb3ce..9344cbacd75 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test @@ -34,4 +36,37 @@ inline fun doWorkInConstructor(crossinline jobO: ()-> R, crossinline jobK: ( } } return s; -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun test1(): String { + val o = "O" + + val result = doWork ({o}, {"K"}, "11") + + return result.getO() + result.getK() + result.param +} + +fun test2() : String { + //same names as in object + val o1 = "O" + val k1 = "K" + val param = "11" + val result = doWorkInConstructor ({o1}, {k1}, {param}) + + return result.getO() + result.getK() + result.param +} + +fun box() : String { + val result1 = test1(); + if (result1 != "OK11") return "fail1 $result1" + + val result2 = test2(); + if (result2 != "OK11") return "fail2 $result2" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.1.kt deleted file mode 100644 index d111b541a6d..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return bar {"OK"} () -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.2.kt deleted file mode 100644 index 74f20d5525b..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -inline fun bar(crossinline y: () -> String) = { - call(y) -} - -public inline fun call(f: () -> T): T = f() \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt new file mode 100644 index 00000000000..e93b5834074 --- /dev/null +++ b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt @@ -0,0 +1,18 @@ +// FILE: 1.kt + +package test + +inline fun bar(crossinline y: () -> String) = { + call(y) +} + +public inline fun call(f: () -> T): T = f() + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return bar {"OK"} () +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.1.kt deleted file mode 100644 index d111b541a6d..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return bar {"OK"} () -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.2.kt deleted file mode 100644 index 4db9ae13d8b..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -inline fun bar(crossinline y: () -> String) = { - { { call(y) }() }() -} - -public inline fun call(f: () -> T): T = f() \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt new file mode 100644 index 00000000000..65bd20276ef --- /dev/null +++ b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt @@ -0,0 +1,18 @@ +// FILE: 1.kt + +package test + +inline fun bar(crossinline y: () -> String) = { + { { call(y) }() }() +} + +public inline fun call(f: () -> T): T = f() + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return bar {"OK"} () +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.2.kt deleted file mode 100644 index 2291f739d51..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -inline fun bar(crossinline y: () -> String) = { - { { call(y) }() }() -} - -public inline fun call(crossinline f: () -> T): T = {{ f() }()}() \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt similarity index 59% rename from compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.1.kt rename to compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt index 93ca7800062..c8ad1f3620a 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.1.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package test + +inline fun bar(crossinline y: () -> String) = { + { { call(y) }() }() +} + +public inline fun call(crossinline f: () -> T): T = {{ f() }()}() + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.1.kt deleted file mode 100644 index a5b838f9e35..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return bar { "OK" }.run() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt similarity index 71% rename from compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt index 2fd150ace15..575323aa02a 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test internal interface A { @@ -14,4 +16,13 @@ public inline fun call(crossinline f: () -> T): T = object : A { override fun run() : T { return f() } -}.run() \ No newline at end of file +}.run() + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return bar { "OK" }.run() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.1.kt deleted file mode 100644 index 4862fd09175..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -//KT-7490 -import test.* - -fun box(): String { - return Entity("OK").directed().calc().value -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt similarity index 71% rename from compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt index 00db7bcbf97..7f115210d1e 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test open class Entity(val value: String) @@ -15,4 +17,14 @@ inline fun Self.directed(): Task = object : Task() { override fun calc(): Self = this@directed } - } \ No newline at end of file + } + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +//KT-7490 +import test.* + +fun box(): String { + return Entity("OK").directed().calc().value +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.1.kt deleted file mode 100644 index f2f653f5979..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return A().doSomething().run() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt similarity index 66% rename from compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt index c5466e64c06..08f1968bdcf 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test interface Run { @@ -10,4 +12,12 @@ internal class A { override fun run(): String = "OK" } } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + return A().doSomething().run() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.1.kt deleted file mode 100644 index 298fe8f789b..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return A().doSomething() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt similarity index 55% rename from compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt index b8ed17cf74c..a1bd16a0116 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test internal class A { @@ -6,4 +8,12 @@ internal class A { "OK" }() } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + return A().doSomething() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.1.kt deleted file mode 100644 index 7053160d548..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return A().doSomething("OK") -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt similarity index 55% rename from compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt index 996944b8d4b..e31ce7b1575 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test internal class A { @@ -6,4 +8,12 @@ internal class A { s }() } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + return A().doSomething("OK") +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt6552.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt6552.1.kt deleted file mode 100644 index 458af7c5039..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt6552.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return switch(X.A) + switch(X.B) -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt6552.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt similarity index 54% rename from compiler/testData/codegen/boxInline/anonymousObject/kt6552.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt index c52dbf817a1..fefcc854cbc 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt6552.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public enum class X { A, B } @@ -5,4 +7,12 @@ public enum class X { A, B } public inline fun switch(x: X): String = when (x) { X.A -> "O" X.B -> "K" -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + return switch(X.A) + switch(X.B) +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt8133.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt8133.2.kt deleted file mode 100644 index 3fbc6806a51..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt8133.2.kt +++ /dev/null @@ -1,3 +0,0 @@ -package test - -public inline fun T.myLet(f: (T) -> R): R = f(this) diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt similarity index 65% rename from compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt rename to compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt index d3d50981c89..62037718820 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt @@ -1,3 +1,11 @@ +// FILE: 1.kt + +package test + +public inline fun T.myLet(f: (T) -> R): R = f(this) + +// FILE: 2.kt + import test.* interface foo { @@ -11,4 +19,4 @@ fun box(): String { } } return baz.bar() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9064.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9064.1.kt deleted file mode 100644 index 7bf9a032dc6..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9064.1.kt +++ /dev/null @@ -1,9 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - - val test = Test("OK") - - return test._parameter.property -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9064.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt similarity index 61% rename from compiler/testData/codegen/boxInline/anonymousObject/kt9064.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt index 0f46921bff4..d5a4c742c58 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9064.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class Test(val _member: String) { @@ -14,4 +16,16 @@ interface Z { inline fun test(s: () -> Z): Z { return s() -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + + val test = Test("OK") + + return test._parameter.property +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.1.kt deleted file mode 100644 index 98c9969c3d9..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.1.kt +++ /dev/null @@ -1,9 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - - val test = Test("OK") - - return test._parameter.property.property -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt similarity index 70% rename from compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt index da24cceacf3..c68ac612b04 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class Test(val _member: String) { @@ -18,4 +20,16 @@ interface Z { inline fun test(s: () -> Z): Z { return s() -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + + val test = Test("OK") + + return test._parameter.property.property +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9591.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9591.2.kt deleted file mode 100644 index 08ba53edfee..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9591.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - - - -inline fun inlineFun(p: () -> Unit) { - p() -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9591.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt similarity index 70% rename from compiler/testData/codegen/boxInline/anonymousObject/kt9591.1.kt rename to compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt index f03e39abaae..bb11673f32d 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9591.1.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package test + + + +inline fun inlineFun(p: () -> Unit) { + p() +} + +// FILE: 2.kt + import test.* public fun box(): String { @@ -13,4 +25,4 @@ public fun box(): String { } return z; -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9877.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9877.2.kt deleted file mode 100644 index 4fab92c98bd..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9877.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package test - -fun T.noInline(p: (T) -> Unit) { - p(this) -} - -inline fun inlineCall(p: () -> Unit) { - p() -} - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9877.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt similarity index 68% rename from compiler/testData/codegen/boxInline/anonymousObject/kt9877.1.kt rename to compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt index 5dd5af720e7..74f24a4588a 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9877.1.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +fun T.noInline(p: (T) -> Unit) { + p(this) +} + +inline fun inlineCall(p: () -> Unit) { + p() +} + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.2.kt deleted file mode 100644 index 7f94c43e241..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.2.kt +++ /dev/null @@ -1,6 +0,0 @@ -package test - -inline fun inlineCall(p: () -> Unit) { - p() -} - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt similarity index 71% rename from compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.1.kt rename to compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt index c570bab3c31..262c6930193 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.1.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun inlineCall(p: () -> Unit) { + p() +} + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.1.kt deleted file mode 100644 index 81436d23f2c..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - var result = "fail" - test { it -> result = it } - return result -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt similarity index 67% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt index 99369524bd8..ff2504b3164 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test interface A { @@ -16,3 +18,12 @@ inline fun test(crossinline f: (String) -> Unit) { testNested { it -> { f(it) }()} } +// FILE: 2.kt + +import test.* + +fun box(): String { + var result = "fail" + test { it -> result = it } + return result +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.2.kt deleted file mode 100644 index dd9a104eeb4..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun inlineFun(arg: T, f: (T) -> Unit) { - f(arg) -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt similarity index 77% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.1.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt index 58a354f51e4..3dfa283eec8 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.1.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun inlineFun(arg: T, f: (T) -> Unit) { + f(arg) +} + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.2.kt deleted file mode 100644 index dff81fd226e..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -inline fun inlineFun(arg: T, crossinline f: (T) -> Unit) { - { - f(arg) - }() -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt similarity index 62% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.1.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt index 6aaa9700326..8cba9323d98 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.1.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package test + +inline fun inlineFun(arg: T, crossinline f: (T) -> Unit) { + { + f(arg) + }() +} + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.2.kt deleted file mode 100644 index dff81fd226e..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -inline fun inlineFun(arg: T, crossinline f: (T) -> Unit) { - { - f(arg) - }() -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt similarity index 73% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.1.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt index 58a354f51e4..b746026fa96 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.1.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package test + +inline fun inlineFun(arg: T, crossinline f: (T) -> Unit) { + { + f(arg) + }() +} + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.2.kt deleted file mode 100644 index dff81fd226e..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -inline fun inlineFun(arg: T, crossinline f: (T) -> Unit) { - { - f(arg) - }() -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt similarity index 70% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.1.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt index 383e6dbc71c..a65c88f9e09 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.1.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package test + +inline fun inlineFun(arg: T, crossinline f: (T) -> Unit) { + { + f(arg) + }() +} + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.1.kt deleted file mode 100644 index 81436d23f2c..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - var result = "fail" - test { it -> result = it } - return result -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt similarity index 65% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt index c12fb4a85a7..8aa242bb0fd 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test interface A { @@ -16,3 +18,12 @@ fun test(f: (String) -> Unit) { testNested { it -> { f(it) }()} } +// FILE: 2.kt + +import test.* + +fun box(): String { + var result = "fail" + test { it -> result = it } + return result +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.1.kt deleted file mode 100644 index 20374b19e51..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - var result = "fail" - B("O", "K").test { it -> result = it } - return result -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt similarity index 70% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt index a66480afe80..324fa7fb4b2 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test interface A { @@ -19,4 +21,14 @@ class B(val o: String, val k: String) { } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var result = "fail" + B("O", "K").test { it -> result = it } + return result +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.1.kt deleted file mode 100644 index e38412e5362..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return A().box() -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt similarity index 84% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt index 5d2facc7667..2d1ad3de754 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class A { @@ -27,4 +29,13 @@ class A { return if (result == "start1_additional_2_additional_") "OK" else "fail: $result" } -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return A().box() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.1.kt deleted file mode 100644 index e38412e5362..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return A().box() -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt similarity index 83% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt index 531d2ba719f..e9a6f6be895 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class A { @@ -25,4 +27,13 @@ class A { return if (result == "start1_additional_2_additional_") "OK" else "fail: $result" } -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return A().box() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.1.kt deleted file mode 100644 index e38412e5362..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return A().box() -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt similarity index 79% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt index 318a290ea06..6a46172ff5c 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class A { @@ -21,4 +23,13 @@ class A { return if (result == "start2_additional_") "OK" else "fail: $result" } -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return A().box() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.1.kt deleted file mode 100644 index e38412e5362..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return A().box() -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt similarity index 80% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt index 28a19b9cf19..2229d03b306 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class A { @@ -23,4 +25,13 @@ class A { return if (result == "start2_additional_") "OK" else "fail: $result" } -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return A().box() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.1.kt deleted file mode 100644 index e38412e5362..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return A().box() -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt similarity index 84% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt index b9b145b5dc8..52e6faed839 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class A { @@ -26,4 +28,13 @@ class A { return if (result == "start1_additional_2_additional_") "OK" else "fail: $result" } -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return A().box() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.1.kt deleted file mode 100644 index e38412e5362..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return A().box() -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt similarity index 83% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt index 53928ec1898..94cfc46759f 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class A { @@ -26,4 +28,13 @@ class A { } -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return A().box() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.1.kt deleted file mode 100644 index 7f3f305ecf1..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - var result = "fail" - B("O", "fail").test { it -> result = it } - return result -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt similarity index 69% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt index c04c9a3c4e1..867a8a040bb 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test interface A { @@ -18,4 +20,14 @@ class B(val o: String, val k: String) { testNested { it -> { f(it + "K") }() } } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var result = "fail" + B("O", "fail").test { it -> result = it } + return result +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.1.kt deleted file mode 100644 index 7327af83692..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.1.kt +++ /dev/null @@ -1,8 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - var result = "fail" - B("O", "K").test { it -> result = it } - return result -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt similarity index 65% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt index e30875f5326..fa95495148c 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test interface A { @@ -19,4 +21,15 @@ class B(val o: String, val k: String) { } -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + var result = "fail" + B("O", "K").test { it -> result = it } + return result +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.1.kt deleted file mode 100644 index 1026144be56..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - var result = "" - B("O", "K").test { it -> result += it } - return if (result == "OOKK") "OK" else "fail: $result" -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt similarity index 69% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt index 7e8c804972e..09d238f9d76 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test interface A { @@ -19,4 +21,14 @@ class B(val o: String, val k: String) { testNested ({ it -> f(it + o) }) { it -> f(it + k) } } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var result = "" + B("O", "K").test { it -> result += it } + return if (result == "OOKK") "OK" else "fail: $result" +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.1.kt deleted file mode 100644 index 1026144be56..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - var result = "" - B("O", "K").test { it -> result += it } - return if (result == "OOKK") "OK" else "fail: $result" -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt similarity index 74% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt index 1d3224588c8..2459a2f67e6 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test interface A { @@ -28,4 +30,14 @@ class B(val o: String, val k: String) { } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var result = "" + B("O", "K").test { it -> result += it } + return if (result == "OOKK") "OK" else "fail: $result" +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.1.kt deleted file mode 100644 index f4b19adf740..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - var result = "" - B("O", "K").test { it -> result += it } - return if (result == "startOOKK") "OK" else "fail: $result" -} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt similarity index 75% rename from compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt index 692dbf158c6..472657d058b 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test interface A { @@ -29,4 +31,14 @@ class B(val o: String, val k: String) { } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var result = "" + B("O", "K").test { it -> result += it } + return if (result == "startOOKK") "OK" else "fail: $result" +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/safeCall.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/safeCall.1.kt deleted file mode 100644 index 4891862f4ed..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/safeCall.1.kt +++ /dev/null @@ -1,10 +0,0 @@ -import test.* - -fun box(): String { - var result = "fail" - W("OK").safe { - result = this as String - } - - return result -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/safeCall.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/safeCall.2.kt deleted file mode 100644 index f30d224303a..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/safeCall.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package test - -class W(val value: Any) - -inline fun W.safe(crossinline body : Any.() -> Unit) { - { - this.value?.body() - }() -} - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt b/compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt new file mode 100644 index 00000000000..761baaab332 --- /dev/null +++ b/compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt @@ -0,0 +1,24 @@ +// FILE: 1.kt + +package test + +class W(val value: Any) + +inline fun W.safe(crossinline body : Any.() -> Unit) { + { + this.value?.body() + }() +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var result = "fail" + W("OK").safe { + result = this as String + } + + return result +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.1.kt deleted file mode 100644 index 847b9098fa4..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.1.kt +++ /dev/null @@ -1,12 +0,0 @@ -import test.* - -fun box(): String { - var result = "fail" - W("OK").safe { - { - result = this as String - }() - } - - return result -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.2.kt deleted file mode 100644 index f30d224303a..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package test - -class W(val value: Any) - -inline fun W.safe(crossinline body : Any.() -> Unit) { - { - this.value?.body() - }() -} - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt b/compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt new file mode 100644 index 00000000000..ed67f8175f0 --- /dev/null +++ b/compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt @@ -0,0 +1,26 @@ +// FILE: 1.kt + +package test + +class W(val value: Any) + +inline fun W.safe(crossinline body : Any.() -> Unit) { + { + this.value?.body() + }() +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var result = "fail" + W("OK").safe { + { + result = this as String + }() + } + + return result +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.1.kt deleted file mode 100644 index 8ab2fab3625..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return A().testCall() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt similarity index 70% rename from compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt index efcb79b7e19..6aabb90b5b5 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class A { @@ -17,4 +19,13 @@ class A { l() + callK() }() } -} \ No newline at end of file +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return A().testCall() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.1.kt deleted file mode 100644 index f8598f8e395..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return Person("OK").sayName() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt similarity index 72% rename from compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt index 1f760941526..c25485dceac 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class Person(val name: String) { @@ -13,3 +15,11 @@ class Person(val name: String) { inline fun nestedSayName2(call: () -> String) = call() } +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return Person("OK").sayName() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.1.kt deleted file mode 100644 index 4728c85dcac..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.1.kt +++ /dev/null @@ -1,9 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - val res = Person("OK").sayName() - if (res != "OKsubOK") return "fail: $res" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt similarity index 65% rename from compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt index 88c370e29e1..66f310e4426 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class Person(val name: String) { @@ -12,3 +14,15 @@ class Person(val name: String) { inline fun nestedSayName2(call: () -> String) = name + call() } + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + val res = Person("OK").sayName() + if (res != "OKsubOK") return "fail: $res" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.1.kt deleted file mode 100644 index b1eab3894db..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return Company("OK").sayName() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt similarity index 74% rename from compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt index 97435461444..d1188cc9d1f 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class Company(val name: String) { @@ -15,3 +17,12 @@ class Person(val name: String) { fun companyName(call: () -> String) = call() } + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return Company("OK").sayName() +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.1.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.1.kt deleted file mode 100644 index f8598f8e395..00000000000 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -fun box(): String { - return Person("OK").sayName() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.2.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt similarity index 71% rename from compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.2.kt rename to compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt index cdfa25bf19c..569b29472d2 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test fun Person.sayName() = doSayName { name } @@ -12,3 +14,11 @@ inline fun Person.parsonName(call: () -> String) = call() fun Person.companyName(call: () -> String) = call() +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +fun box(): String { + return Person("OK").sayName() +} diff --git a/compiler/testData/codegen/boxInline/argumentOrder/captured.2.kt b/compiler/testData/codegen/boxInline/argumentOrder/captured.2.kt deleted file mode 100644 index 1051e47d9a0..00000000000 --- a/compiler/testData/codegen/boxInline/argumentOrder/captured.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun test(a: Int, b: Long, crossinline c: () -> String): String { - return { "${a}_${b}_${c()}"} () -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/argumentOrder/captured.1.kt b/compiler/testData/codegen/boxInline/argumentOrder/captured.kt similarity index 89% rename from compiler/testData/codegen/boxInline/argumentOrder/captured.1.kt rename to compiler/testData/codegen/boxInline/argumentOrder/captured.kt index 60e2061d073..0388cd57054 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/captured.1.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/captured.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun test(a: Int, b: Long, crossinline c: () -> String): String { + return { "${a}_${b}_${c()}"} () +} + +// FILE: 2.kt + import test.* fun box(): String { @@ -26,4 +36,4 @@ fun box(): String { if (invokeOrder != "0_1_9" || result != expectedResult) return "fail 4: $invokeOrder != 0_1_9 or $result != $expectedResult" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.2.kt b/compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.2.kt deleted file mode 100644 index 2b23d24c452..00000000000 --- a/compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.2.kt +++ /dev/null @@ -1,6 +0,0 @@ -package test - -inline fun Double.test(a: Int, b: Long, crossinline c: () -> String): String { - - return { "${this}_${a}_${b}_${c()}"} () -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.1.kt b/compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt similarity index 89% rename from compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.1.kt rename to compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt index 3fe3354b186..096c5fe75e4 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.1.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt @@ -1,3 +1,14 @@ +// FILE: 1.kt + +package test + +inline fun Double.test(a: Int, b: Long, crossinline c: () -> String): String { + + return { "${this}_${a}_${b}_${c()}"} () +} + +// FILE: 2.kt + import test.* fun box(): String { @@ -25,4 +36,4 @@ fun box(): String { if (invokeOrder != "0_1_9" || result != expectedResult) return "fail 4: $invokeOrder != 0_1_9 or $result != $expectedResult" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/argumentOrder/extension.2.kt b/compiler/testData/codegen/boxInline/argumentOrder/extension.2.kt deleted file mode 100644 index 330b5134a28..00000000000 --- a/compiler/testData/codegen/boxInline/argumentOrder/extension.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun Double.test(a: Int, b: Long, c: () -> String): String { - return "${this}_${a}_${b}_${c()}" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/argumentOrder/extension.1.kt b/compiler/testData/codegen/boxInline/argumentOrder/extension.kt similarity index 89% rename from compiler/testData/codegen/boxInline/argumentOrder/extension.1.kt rename to compiler/testData/codegen/boxInline/argumentOrder/extension.kt index 7a9178dad16..b58a2cfab1e 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/extension.1.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/extension.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun Double.test(a: Int, b: Long, c: () -> String): String { + return "${this}_${a}_${b}_${c()}" +} + +// FILE: 2.kt + import test.* fun box(): String { @@ -25,4 +35,4 @@ fun box(): String { if (invokeOrder != "0_1_L" || result != expectedResult) return "fail 4: $invokeOrder != 0_1_L or $result != $expectedResult" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.2.kt b/compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.2.kt deleted file mode 100644 index 700bb85ee7c..00000000000 --- a/compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -class Z { - inline fun Double.test(a: Int, b: Long, c: () -> String): String { - return "${this}_${a}_${b}_${c()}" - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.1.kt b/compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt similarity index 88% rename from compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.1.kt rename to compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt index 8605b256de6..d97a31d59b8 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.1.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package test + +class Z { + inline fun Double.test(a: Int, b: Long, c: () -> String): String { + return "${this}_${a}_${b}_${c()}" + } +} + +// FILE: 2.kt + import test.* fun box(): String { @@ -27,4 +39,4 @@ fun box(): String { } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.2.kt b/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.2.kt deleted file mode 100644 index 2bbfaf5dff4..00000000000 --- a/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun test(a: String, b: String, c: () -> String): String { - return a + b + c(); -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.1.kt b/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt similarity index 81% rename from compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.1.kt rename to compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt index cd542a8fa24..9f250938e48 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.1.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun test(a: String, b: String, c: () -> String): String { + return a + b + c(); +} + +// FILE: 2.kt + import test.* fun box(): String { @@ -16,4 +26,4 @@ fun box(): String { return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.2.kt b/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.2.kt deleted file mode 100644 index 57ddd8644e8..00000000000 --- a/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -class Z(val p: String) { - - inline fun test(a: String, b: String, c: () -> String): String { - return a + b + c() + p; - } - -} diff --git a/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.1.kt b/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt similarity index 77% rename from compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.1.kt rename to compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt index 2e3cd84e63c..638855d7972 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.1.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +class Z(val p: String) { + + inline fun test(a: String, b: String, c: () -> String): String { + return a + b + c() + p; + } + +} + +// FILE: 2.kt + import test.* fun box(): String { @@ -16,4 +30,4 @@ fun box(): String { return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/argumentOrder/simple.2.kt b/compiler/testData/codegen/boxInline/argumentOrder/simple.2.kt deleted file mode 100644 index 2bbfaf5dff4..00000000000 --- a/compiler/testData/codegen/boxInline/argumentOrder/simple.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun test(a: String, b: String, c: () -> String): String { - return a + b + c(); -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/argumentOrder/simple.1.kt b/compiler/testData/codegen/boxInline/argumentOrder/simple.kt similarity index 81% rename from compiler/testData/codegen/boxInline/argumentOrder/simple.1.kt rename to compiler/testData/codegen/boxInline/argumentOrder/simple.kt index 14f10117d9e..bc5c17dfb17 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/simple.1.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/simple.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun test(a: String, b: String, c: () -> String): String { + return a + b + c(); +} + +// FILE: 2.kt + import test.* fun box(): String { @@ -16,4 +26,4 @@ fun box(): String { return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.2.kt b/compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.2.kt deleted file mode 100644 index a15e197692d..00000000000 --- a/compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -class Z(val p: String) { - inline fun test(a: String, b: String, c: () -> String): String { - return a + b + c() + p; - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.1.kt b/compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt similarity index 78% rename from compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.1.kt rename to compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt index e34462e2c41..bfca5a89979 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.1.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package test + +class Z(val p: String) { + inline fun test(a: String, b: String, c: () -> String): String { + return a + b + c() + p; + } +} + +// FILE: 2.kt + import test.* fun box(): String { @@ -16,4 +28,4 @@ fun box(): String { return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.1.kt deleted file mode 100644 index 1d31b27135e..00000000000 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.1.kt +++ /dev/null @@ -1,15 +0,0 @@ -import test.* - - -fun box(): String { - - val z = 1; - - val p = z[2, 3] - if (p != 6) return "fail 1: $p" - - z[2, 3] = p - if (res != 12) return "fail 2: $res" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.2.kt deleted file mode 100644 index 0a8fb85ccb1..00000000000 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -var res = 1 - -inline operator fun Int.get(z: Int, p: Int) = this + z + p - -inline operator fun Int.set(z: Int, p: Int, l: Int) { - res = this + z + p + l -} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt new file mode 100644 index 00000000000..39130114ad1 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt @@ -0,0 +1,29 @@ +// FILE: 1.kt + +package test + +var res = 1 + +inline operator fun Int.get(z: Int, p: Int) = this + z + p + +inline operator fun Int.set(z: Int, p: Int, l: Int) { + res = this + z + p + l +} + +// FILE: 2.kt + +import test.* + + +fun box(): String { + + val z = 1; + + val p = z[2, 3] + if (p != 6) return "fail 1: $p" + + z[2, 3] = p + if (res != 12) return "fail 2: $res" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.1.kt deleted file mode 100644 index ec7f5272558..00000000000 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.1.kt +++ /dev/null @@ -1,17 +0,0 @@ -import test.* - - -fun box(): String { - - with(A()) { - val z = 1; - - val p = z[2, 3] - if (p != 6) return "fail 1: $p" - - z[2, 3] = p - if (res != 12) return "fail 2: $res" - } - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.2.kt deleted file mode 100644 index 3c98afa7a89..00000000000 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.2.kt +++ /dev/null @@ -1,13 +0,0 @@ -package test - -var res = 1 - -class A { - - inline operator fun Int.get(z: Int, p: Int) = this + z + p - - inline operator fun Int.set(z: Int, p: Int, l: Int) { - res = this + z + p + l - } - -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt new file mode 100644 index 00000000000..8ddc596dba6 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt @@ -0,0 +1,35 @@ +// FILE: 1.kt + +package test + +var res = 1 + +class A { + + inline operator fun Int.get(z: Int, p: Int) = this + z + p + + inline operator fun Int.set(z: Int, p: Int, l: Int) { + res = this + z + p + l + } + +} + +// FILE: 2.kt + +import test.* + + +fun box(): String { + + with(A()) { + val z = 1; + + val p = z[2, 3] + if (p != 6) return "fail 1: $p" + + z[2, 3] = p + if (res != 12) return "fail 2: $res" + } + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.1.kt deleted file mode 100644 index b43bb3ee1f1..00000000000 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.1.kt +++ /dev/null @@ -1,16 +0,0 @@ -import test.* - - -fun box(): String { - - val z = 1; - - val p = z[2, { 3 }] - if (p != 106) return "fail 1: $p" - - val captured = 3; - z[2, { captured } ] = p - if (res != 112) return "fail 2: $res" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.2.kt deleted file mode 100644 index e18bd8a4ec8..00000000000 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -var res = 1 - -inline operator fun Int.get(z: Int, p: () -> Int, defaultt: Int = 100) = this + z + p() + defaultt - -inline operator fun Int.set(z: Int, p: () -> Int, l: Int/*, x : Int = 1000*/) { - res = this + z + p() + l /*+ x*/ -} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt new file mode 100644 index 00000000000..08697f40633 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt @@ -0,0 +1,30 @@ +// FILE: 1.kt + +package test + +var res = 1 + +inline operator fun Int.get(z: Int, p: () -> Int, defaultt: Int = 100) = this + z + p() + defaultt + +inline operator fun Int.set(z: Int, p: () -> Int, l: Int/*, x : Int = 1000*/) { + res = this + z + p() + l /*+ x*/ +} + +// FILE: 2.kt + +import test.* + + +fun box(): String { + + val z = 1; + + val p = z[2, { 3 }] + if (p != 106) return "fail 1: $p" + + val captured = 3; + z[2, { captured } ] = p + if (res != 112) return "fail 2: $res" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.1.kt deleted file mode 100644 index a1c9d8acd37..00000000000 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.1.kt +++ /dev/null @@ -1,19 +0,0 @@ -import test.* - - -fun box(): String { - - val z = 1; - - with(A()) { - - val p = z[2, { 3 }] - if (p != 106) return "fail 1: $p" - - val captured = 3; - z[2, { captured }] = p - if (res != 112) return "fail 2: $res" - } - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.2.kt deleted file mode 100644 index e90dc1d6a5b..00000000000 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - -var res = 1 - -class A { - - inline operator fun Int.get(z: Int, p: () -> Int, defaultt: Int = 100) = this + z + p() + defaultt - - inline operator fun Int.set(z: Int, p: () -> Int, l: Int/*, x : Int = 1000*/) { - res = this + z + p() + l /*+ x*/ - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt new file mode 100644 index 00000000000..395c99bf342 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt @@ -0,0 +1,36 @@ +// FILE: 1.kt + +package test + +var res = 1 + +class A { + + inline operator fun Int.get(z: Int, p: () -> Int, defaultt: Int = 100) = this + z + p() + defaultt + + inline operator fun Int.set(z: Int, p: () -> Int, l: Int/*, x : Int = 1000*/) { + res = this + z + p() + l /*+ x*/ + } +} + +// FILE: 2.kt + +import test.* + + +fun box(): String { + + val z = 1; + + with(A()) { + + val p = z[2, { 3 }] + if (p != 106) return "fail 1: $p" + + val captured = 3; + z[2, { captured }] = p + if (res != 112) return "fail 2: $res" + } + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.2.kt deleted file mode 100644 index 5dfcb79e9df..00000000000 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -var res = 1 - -inline operator fun Int.get(z: Int, p: () -> Int) = this + z + p() - -inline operator fun Int.set(z: Int, p: () -> Int, l: Int) { - res = this + z + p() + l -} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt similarity index 50% rename from compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.1.kt rename to compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt index 3f3f796d0eb..15ee64d9166 100644 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.1.kt +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +var res = 1 + +inline operator fun Int.get(z: Int, p: () -> Int) = this + z + p() + +inline operator fun Int.set(z: Int, p: () -> Int, l: Int) { + res = this + z + p() + l +} + +// FILE: 2.kt + import test.* @@ -13,4 +27,4 @@ fun box(): String { if (res != 12) return "fail 2: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.2.kt deleted file mode 100644 index 785f954fcb3..00000000000 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.2.kt +++ /dev/null @@ -1,13 +0,0 @@ -package test - -var res = 1 - -class A { - - inline operator fun Int.get(z: Int, p: () -> Int) = this + z + p() - - inline operator fun Int.set(z: Int, p: () -> Int, l: Int) { - res = this + z + p() + l - } - -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt similarity index 51% rename from compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.1.kt rename to compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt index 9f7f1ba0345..39eef427f6e 100644 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.1.kt +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt @@ -1,3 +1,21 @@ +// FILE: 1.kt + +package test + +var res = 1 + +class A { + + inline operator fun Int.get(z: Int, p: () -> Int) = this + z + p() + + inline operator fun Int.set(z: Int, p: () -> Int, l: Int) { + res = this + z + p() + l + } + +} + +// FILE: 2.kt + import test.* diff --git a/compiler/testData/codegen/boxInline/builders/builders.2.kt b/compiler/testData/codegen/boxInline/builders/builders.2.kt deleted file mode 100644 index 61301370d54..00000000000 --- a/compiler/testData/codegen/boxInline/builders/builders.2.kt +++ /dev/null @@ -1,108 +0,0 @@ -package builders - -import java.util.ArrayList -import java.util.HashMap - -abstract class Element { - abstract fun render(builder: StringBuilder, indent: String) - - override fun toString(): String { - val builder = StringBuilder() - render(builder, "") - return builder.toString() - } -} - -class TextElement(val text: String) : Element() { - override fun render(builder: StringBuilder, indent: String) { - builder.append("$indent$text\n") - } -} - -abstract class Tag(val name: String) : Element() { - val children = ArrayList() - val attributes = HashMap() - - inline protected fun initTag(tag: T, init: T.() -> Unit): T { - tag.init() - children.add(tag) - return tag - } - - override fun render(builder: StringBuilder, indent: String) { - builder.append("$indent<$name${renderAttributes()}>\n") - for (c in children) { - c.render(builder, indent + " ") - } - builder.append("$indent\n") - } - - private fun renderAttributes(): String? { - val builder = StringBuilder() - for (a in attributes.keys) { - builder.append(" $a=\"${attributes[a]}\"") - } - return builder.toString() - } -} - -abstract class TagWithText(name: String) : Tag(name) { - operator fun String.unaryPlus() { - children.add(TextElement(this)) - } -} - -class HTML() : TagWithText("html") { - inline fun head(init: Head.() -> Unit) = initTag(Head(), init) - - inline fun body(init: Body.() -> Unit) = initTag(Body(), init) - - fun bodyNoInline(init: Body.() -> Unit) = initTag(Body(), init) -} - -class Head() : TagWithText("head") { - inline fun title(init: Title.() -> Unit) = initTag(Title(), init) -} - -class Title() : TagWithText("title") - -abstract class BodyTag(name: String) : TagWithText(name) { - inline fun b(init: B.() -> Unit) = initTag(B(), init) - inline fun p(init: P.() -> Unit) = initTag(P(), init) - inline fun pNoInline(init: P.() -> Unit) = initTag(P(), init) - inline fun h1(init: H1.() -> Unit) = initTag(H1(), init) - inline fun ul(init: UL.() -> Unit) = initTag(UL(), init) - inline fun a(href: String, init: A.() -> Unit) { - val a = initTag(A(), init) - a.href = href - } -} - -class Body() : BodyTag("body") -class UL() : BodyTag("ul") { - inline fun li(init: LI.() -> Unit) = initTag(LI(), init) -} - -class B() : BodyTag("b") -class LI() : BodyTag("li") -class P() : BodyTag("p") -class H1() : BodyTag("h1") -class A() : BodyTag("a") { - public var href: String - get() = attributes["href"]!! - set(value) { - attributes["href"] = value - } -} - -inline fun html(init: HTML.() -> Unit): HTML { - val html = HTML() - html.init() - return html -} - -fun htmlNoInline(init: HTML.() -> Unit): HTML { - val html = HTML() - html.init() - return html -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/builders/builders.1.kt b/compiler/testData/codegen/boxInline/builders/builders.kt similarity index 66% rename from compiler/testData/codegen/boxInline/builders/builders.1.kt rename to compiler/testData/codegen/boxInline/builders/builders.kt index 685f51ae3c0..cb67a3eba51 100644 --- a/compiler/testData/codegen/boxInline/builders/builders.1.kt +++ b/compiler/testData/codegen/boxInline/builders/builders.kt @@ -1,3 +1,116 @@ +// FILE: 1.kt + +package builders + +import java.util.ArrayList +import java.util.HashMap + +abstract class Element { + abstract fun render(builder: StringBuilder, indent: String) + + override fun toString(): String { + val builder = StringBuilder() + render(builder, "") + return builder.toString() + } +} + +class TextElement(val text: String) : Element() { + override fun render(builder: StringBuilder, indent: String) { + builder.append("$indent$text\n") + } +} + +abstract class Tag(val name: String) : Element() { + val children = ArrayList() + val attributes = HashMap() + + inline protected fun initTag(tag: T, init: T.() -> Unit): T { + tag.init() + children.add(tag) + return tag + } + + override fun render(builder: StringBuilder, indent: String) { + builder.append("$indent<$name${renderAttributes()}>\n") + for (c in children) { + c.render(builder, indent + " ") + } + builder.append("$indent\n") + } + + private fun renderAttributes(): String? { + val builder = StringBuilder() + for (a in attributes.keys) { + builder.append(" $a=\"${attributes[a]}\"") + } + return builder.toString() + } +} + +abstract class TagWithText(name: String) : Tag(name) { + operator fun String.unaryPlus() { + children.add(TextElement(this)) + } +} + +class HTML() : TagWithText("html") { + inline fun head(init: Head.() -> Unit) = initTag(Head(), init) + + inline fun body(init: Body.() -> Unit) = initTag(Body(), init) + + fun bodyNoInline(init: Body.() -> Unit) = initTag(Body(), init) +} + +class Head() : TagWithText("head") { + inline fun title(init: Title.() -> Unit) = initTag(Title(), init) +} + +class Title() : TagWithText("title") + +abstract class BodyTag(name: String) : TagWithText(name) { + inline fun b(init: B.() -> Unit) = initTag(B(), init) + inline fun p(init: P.() -> Unit) = initTag(P(), init) + inline fun pNoInline(init: P.() -> Unit) = initTag(P(), init) + inline fun h1(init: H1.() -> Unit) = initTag(H1(), init) + inline fun ul(init: UL.() -> Unit) = initTag(UL(), init) + inline fun a(href: String, init: A.() -> Unit) { + val a = initTag(A(), init) + a.href = href + } +} + +class Body() : BodyTag("body") +class UL() : BodyTag("ul") { + inline fun li(init: LI.() -> Unit) = initTag(LI(), init) +} + +class B() : BodyTag("b") +class LI() : BodyTag("li") +class P() : BodyTag("p") +class H1() : BodyTag("h1") +class A() : BodyTag("a") { + public var href: String + get() = attributes["href"]!! + set(value) { + attributes["href"] = value + } +} + +inline fun html(init: HTML.() -> Unit): HTML { + val html = HTML() + html.init() + return html +} + +fun htmlNoInline(init: HTML.() -> Unit): HTML { + val html = HTML() + html.init() + return html +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import builders.* @@ -171,4 +284,4 @@ fun box(): String { if (expected != testBodyHtmlNoInline()) return "fail 3: ${testBodyHtmlNoInline()}\nbut expected\n${expected} " return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.2.kt b/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.2.kt deleted file mode 100644 index 61c5ea0fc12..00000000000 --- a/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.2.kt +++ /dev/null @@ -1,108 +0,0 @@ -package builders - -import java.util.ArrayList -import java.util.HashMap - -abstract class Element { - abstract fun render(builder: StringBuilder, indent: String) - - override fun toString(): String { - val builder = StringBuilder() - render(builder, "") - return builder.toString() - } -} - -class TextElement(val text: String) : Element() { - override fun render(builder: StringBuilder, indent: String) { - builder.append("$indent$text\n") - } -} - -abstract class Tag(val name: String) : Element() { - val children = ArrayList() - val attributes = HashMap() - - inline protected fun initTag(tag: T, init: T.() -> Unit): T { - tag.init() - children.add(tag) - return tag - } - - override fun render(builder: StringBuilder, indent: String) { - builder.append("$indent<$name${renderAttributes()}>\n") - for (c in children) { - c.render(builder, indent + " ") - } - builder.append("$indent\n") - } - - private fun renderAttributes(): String? { - val builder = StringBuilder() - for (a in attributes.keys) { - builder.append(" $a=\"${attributes[a]}\"") - } - return builder.toString() - } -} - -abstract class TagWithText(name: String) : Tag(name) { - operator fun String.unaryPlus() { - children.add(TextElement(this)) - } -} - -class HTML() : TagWithText("html") { - inline fun head(init: Head.() -> Unit) = initTag(Head(), init) - - inline fun body(init: Body.() -> Unit) = initTag(Body(), init) - - fun bodyNoInline(init: Body.() -> Unit) = initTag(Body(), init) -} - -class Head() : TagWithText("head") { - inline fun title(init: Title.() -> Unit) = initTag(Title(), init) -} - -class Title() : TagWithText("title") - -abstract class BodyTag(name: String) : TagWithText(name) { - inline fun b(init: B.() -> Unit) = initTag(B(), init) - inline fun p(init: P.() -> Unit) = initTag(P(), init) - fun pNoInline(init: P.() -> Unit) = initTag(P(), init) - inline fun h1(init: H1.() -> Unit) = initTag(H1(), init) - inline fun ul(init: UL.() -> Unit) = initTag(UL(), init) - inline fun a(href: String, init: A.() -> Unit) { - val a = initTag(A(), init) - a.href = href - } -} - -class Body() : BodyTag("body") -class UL() : BodyTag("ul") { - inline fun li(init: LI.() -> Unit) = initTag(LI(), init) -} - -class B() : BodyTag("b") -class LI() : BodyTag("li") -class P() : BodyTag("p") -class H1() : BodyTag("h1") -class A() : BodyTag("a") { - public var href: String - get() = attributes["href"]!! - set(value) { - attributes["href"] = value - } -} - -inline fun html(init: HTML.() -> Unit): HTML { - val html = HTML() - html.init() - return html -} - -fun htmlNoInline(init: HTML.() -> Unit): HTML { - val html = HTML() - html.init() - return html -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.1.kt b/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt similarity index 69% rename from compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.1.kt rename to compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt index 48cb2c2e22c..424b654ad2a 100644 --- a/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.1.kt +++ b/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt @@ -1,3 +1,116 @@ +// FILE: 1.kt + +package builders + +import java.util.ArrayList +import java.util.HashMap + +abstract class Element { + abstract fun render(builder: StringBuilder, indent: String) + + override fun toString(): String { + val builder = StringBuilder() + render(builder, "") + return builder.toString() + } +} + +class TextElement(val text: String) : Element() { + override fun render(builder: StringBuilder, indent: String) { + builder.append("$indent$text\n") + } +} + +abstract class Tag(val name: String) : Element() { + val children = ArrayList() + val attributes = HashMap() + + inline protected fun initTag(tag: T, init: T.() -> Unit): T { + tag.init() + children.add(tag) + return tag + } + + override fun render(builder: StringBuilder, indent: String) { + builder.append("$indent<$name${renderAttributes()}>\n") + for (c in children) { + c.render(builder, indent + " ") + } + builder.append("$indent\n") + } + + private fun renderAttributes(): String? { + val builder = StringBuilder() + for (a in attributes.keys) { + builder.append(" $a=\"${attributes[a]}\"") + } + return builder.toString() + } +} + +abstract class TagWithText(name: String) : Tag(name) { + operator fun String.unaryPlus() { + children.add(TextElement(this)) + } +} + +class HTML() : TagWithText("html") { + inline fun head(init: Head.() -> Unit) = initTag(Head(), init) + + inline fun body(init: Body.() -> Unit) = initTag(Body(), init) + + fun bodyNoInline(init: Body.() -> Unit) = initTag(Body(), init) +} + +class Head() : TagWithText("head") { + inline fun title(init: Title.() -> Unit) = initTag(Title(), init) +} + +class Title() : TagWithText("title") + +abstract class BodyTag(name: String) : TagWithText(name) { + inline fun b(init: B.() -> Unit) = initTag(B(), init) + inline fun p(init: P.() -> Unit) = initTag(P(), init) + fun pNoInline(init: P.() -> Unit) = initTag(P(), init) + inline fun h1(init: H1.() -> Unit) = initTag(H1(), init) + inline fun ul(init: UL.() -> Unit) = initTag(UL(), init) + inline fun a(href: String, init: A.() -> Unit) { + val a = initTag(A(), init) + a.href = href + } +} + +class Body() : BodyTag("body") +class UL() : BodyTag("ul") { + inline fun li(init: LI.() -> Unit) = initTag(LI(), init) +} + +class B() : BodyTag("b") +class LI() : BodyTag("li") +class P() : BodyTag("p") +class H1() : BodyTag("h1") +class A() : BodyTag("a") { + public var href: String + get() = attributes["href"]!! + set(value) { + attributes["href"] = value + } +} + +inline fun html(init: HTML.() -> Unit): HTML { + val html = HTML() + html.init() + return html +} + +fun htmlNoInline(init: HTML.() -> Unit): HTML { + val html = HTML() + html.init() + return html +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import builders.* @@ -175,4 +288,4 @@ fun box(): String { if (expected != testBodyHtmlNoInline({captured})) return "fail 6: ${testBodyHtmlNoInline({captured})}\nbut expected\n${expected} " return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/classLevel.1.kt b/compiler/testData/codegen/boxInline/callableReference/classLevel.1.kt deleted file mode 100644 index be79b739172..00000000000 --- a/compiler/testData/codegen/boxInline/callableReference/classLevel.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box() : String { - val call = call(A(11), A::calc) - return if (call == 11) "OK" else "fail" -} - diff --git a/compiler/testData/codegen/boxInline/callableReference/classLevel.2.kt b/compiler/testData/codegen/boxInline/callableReference/classLevel.2.kt deleted file mode 100644 index 5738150e894..00000000000 --- a/compiler/testData/codegen/boxInline/callableReference/classLevel.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -class A(val z: Int) { - fun calc() = z -} - -inline fun call(p: A, s: A.() -> Int): Int { - return p.s() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/callableReference/classLevel.kt b/compiler/testData/codegen/boxInline/callableReference/classLevel.kt new file mode 100644 index 00000000000..384931b1398 --- /dev/null +++ b/compiler/testData/codegen/boxInline/callableReference/classLevel.kt @@ -0,0 +1,20 @@ +// FILE: 1.kt + +package test + +class A(val z: Int) { + fun calc() = z +} + +inline fun call(p: A, s: A.() -> Int): Int { + return p.s() +} + +// FILE: 2.kt + +import test.* + +fun box() : String { + val call = call(A(11), A::calc) + return if (call == 11) "OK" else "fail" +} diff --git a/compiler/testData/codegen/boxInline/callableReference/classLevel2.1.kt b/compiler/testData/codegen/boxInline/callableReference/classLevel2.1.kt deleted file mode 100644 index 44db4ed136e..00000000000 --- a/compiler/testData/codegen/boxInline/callableReference/classLevel2.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box() : String { - val call = A(11).test() - return if (call == 11) "OK" else "fail" -} - diff --git a/compiler/testData/codegen/boxInline/callableReference/classLevel2.2.kt b/compiler/testData/codegen/boxInline/callableReference/classLevel2.kt similarity index 53% rename from compiler/testData/codegen/boxInline/callableReference/classLevel2.2.kt rename to compiler/testData/codegen/boxInline/callableReference/classLevel2.kt index 56136110b36..893b834aed8 100644 --- a/compiler/testData/codegen/boxInline/callableReference/classLevel2.2.kt +++ b/compiler/testData/codegen/boxInline/callableReference/classLevel2.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class A(val z: Int) { @@ -9,3 +11,12 @@ class A(val z: Int) { inline fun call(p: A, s: A.() -> Int): Int { return p.s() } + +// FILE: 2.kt + +import test.* + +fun box() : String { + val call = A(11).test() + return if (call == 11) "OK" else "fail" +} diff --git a/compiler/testData/codegen/boxInline/callableReference/constructor.1.kt b/compiler/testData/codegen/boxInline/callableReference/constructor.1.kt deleted file mode 100644 index 9ab7ad48ca9..00000000000 --- a/compiler/testData/codegen/boxInline/callableReference/constructor.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box() : String { - val call = call(11, ::A) - return if (call == 11) "OK" else "fail" -} - diff --git a/compiler/testData/codegen/boxInline/callableReference/constructor.2.kt b/compiler/testData/codegen/boxInline/callableReference/constructor.2.kt deleted file mode 100644 index 3c9678c5f27..00000000000 --- a/compiler/testData/codegen/boxInline/callableReference/constructor.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -class A(val z: Int) { - fun calc() = z -} - -inline fun call(p: Int, s: (Int) -> A): Int { - return s(p).z -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/callableReference/constructor.kt b/compiler/testData/codegen/boxInline/callableReference/constructor.kt new file mode 100644 index 00000000000..d16c19fb284 --- /dev/null +++ b/compiler/testData/codegen/boxInline/callableReference/constructor.kt @@ -0,0 +1,20 @@ +// FILE: 1.kt + +package test + +class A(val z: Int) { + fun calc() = z +} + +inline fun call(p: Int, s: (Int) -> A): Int { + return s(p).z +} + +// FILE: 2.kt + +import test.* + +fun box() : String { + val call = call(11, ::A) + return if (call == 11) "OK" else "fail" +} diff --git a/compiler/testData/codegen/boxInline/callableReference/intrinsic.1.kt b/compiler/testData/codegen/boxInline/callableReference/intrinsic.1.kt deleted file mode 100644 index ec51f1baa1a..00000000000 --- a/compiler/testData/codegen/boxInline/callableReference/intrinsic.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box() : String { - return if (call("123", String::length) == 3) "OK" else "fail" -} diff --git a/compiler/testData/codegen/boxInline/callableReference/intrinsic.2.kt b/compiler/testData/codegen/boxInline/callableReference/intrinsic.2.kt deleted file mode 100644 index a4e418a8804..00000000000 --- a/compiler/testData/codegen/boxInline/callableReference/intrinsic.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun call(p: String, s: String.() -> Int): Int { - return p.s() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/callableReference/intrinsic.kt b/compiler/testData/codegen/boxInline/callableReference/intrinsic.kt new file mode 100644 index 00000000000..2be864d9bb9 --- /dev/null +++ b/compiler/testData/codegen/boxInline/callableReference/intrinsic.kt @@ -0,0 +1,15 @@ +// FILE: 1.kt + +package test + +inline fun call(p: String, s: String.() -> Int): Int { + return p.s() +} + +// FILE: 2.kt + +import test.* + +fun box() : String { + return if (call("123", String::length) == 3) "OK" else "fail" +} diff --git a/compiler/testData/codegen/boxInline/callableReference/topLevel.2.kt b/compiler/testData/codegen/boxInline/callableReference/topLevel.2.kt deleted file mode 100644 index 0632650c47c..00000000000 --- a/compiler/testData/codegen/boxInline/callableReference/topLevel.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun call(p: Int, s: (Int) -> Int): Int { - return s(p) -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/callableReference/topLevel.1.kt b/compiler/testData/codegen/boxInline/callableReference/topLevel.kt similarity index 54% rename from compiler/testData/codegen/boxInline/callableReference/topLevel.1.kt rename to compiler/testData/codegen/boxInline/callableReference/topLevel.kt index 322598f48ee..87208f55ed4 100644 --- a/compiler/testData/codegen/boxInline/callableReference/topLevel.1.kt +++ b/compiler/testData/codegen/boxInline/callableReference/topLevel.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun call(p: Int, s: (Int) -> Int): Int { + return s(p) +} + +// FILE: 2.kt + import test.* fun box() : String { @@ -6,4 +16,4 @@ fun box() : String { fun calc(p: Int) : Int { return p / 2 -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/topLevelExtension.2.kt b/compiler/testData/codegen/boxInline/callableReference/topLevelExtension.2.kt deleted file mode 100644 index c4db2261ce7..00000000000 --- a/compiler/testData/codegen/boxInline/callableReference/topLevelExtension.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun call(p: Int, s: Int.(Int) -> Int): Int { - return p.s(p) -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/callableReference/topLevelExtension.1.kt b/compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt similarity index 55% rename from compiler/testData/codegen/boxInline/callableReference/topLevelExtension.1.kt rename to compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt index 2d76235bb00..eaabbf11261 100644 --- a/compiler/testData/codegen/boxInline/callableReference/topLevelExtension.1.kt +++ b/compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun call(p: Int, s: Int.(Int) -> Int): Int { + return p.s(p) +} + +// FILE: 2.kt + import test.* fun box() : String { @@ -6,4 +16,4 @@ fun box() : String { fun Int.calc(p: Int) : Int { return p * this -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/capture/captureInlinable.2.kt b/compiler/testData/codegen/boxInline/capture/captureInlinable.2.kt deleted file mode 100644 index 0dcea6524a2..00000000000 --- a/compiler/testData/codegen/boxInline/capture/captureInlinable.2.kt +++ /dev/null @@ -1,11 +0,0 @@ -package test - - -inline fun doWork(crossinline job: ()-> R) : R { - return notInline({job()}) -} - -fun notInline(job: ()-> R) : R { - return job() -} - diff --git a/compiler/testData/codegen/boxInline/capture/captureInlinable.1.kt b/compiler/testData/codegen/boxInline/capture/captureInlinable.kt similarity index 56% rename from compiler/testData/codegen/boxInline/capture/captureInlinable.1.kt rename to compiler/testData/codegen/boxInline/capture/captureInlinable.kt index a2945faed5a..0e55f8165c5 100644 --- a/compiler/testData/codegen/boxInline/capture/captureInlinable.1.kt +++ b/compiler/testData/codegen/boxInline/capture/captureInlinable.kt @@ -1,3 +1,18 @@ +// FILE: 1.kt + +package test + + +inline fun doWork(crossinline job: ()-> R) : R { + return notInline({job()}) +} + +fun notInline(job: ()-> R) : R { + return job() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -9,4 +24,4 @@ fun box(): String { if (result2 != 12) return "test2: ${result2}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.2.kt b/compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.2.kt deleted file mode 100644 index b654b844f0d..00000000000 --- a/compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - - -inline fun doWork(crossinline job: ()-> R) : R { - val k = 10; - return notInline({k; job()}) -} - -fun notInline(job: ()-> R) : R { - return job() -} - diff --git a/compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.1.kt b/compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt similarity index 54% rename from compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.1.kt rename to compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt index a2945faed5a..222c0cabea3 100644 --- a/compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.1.kt +++ b/compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt @@ -1,3 +1,19 @@ +// FILE: 1.kt + +package test + + +inline fun doWork(crossinline job: ()-> R) : R { + val k = 10; + return notInline({k; job()}) +} + +fun notInline(job: ()-> R) : R { + return job() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -9,4 +25,4 @@ fun box(): String { if (result2 != 12) return "test2: ${result2}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.2.kt b/compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.2.kt deleted file mode 100644 index 433442c5a46..00000000000 --- a/compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.2.kt +++ /dev/null @@ -1,6 +0,0 @@ -class My(val value: Int) - -inline fun T.perform(job: (T)-> R) : R { - return job(this) -} - diff --git a/compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.1.kt b/compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt similarity index 78% rename from compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.1.kt rename to compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt index 7c2a36f9d72..d2f288948e0 100644 --- a/compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.1.kt +++ b/compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +class My(val value: Int) + +inline fun T.perform(job: (T)-> R) : R { + return job(this) +} + +// FILE: 2.kt + fun test1() : Int { val inlineX = My(111) @@ -25,4 +35,4 @@ fun box(): String { if (test2() != 11) return "test2: ${test2()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/capture/generics.2.kt b/compiler/testData/codegen/boxInline/capture/generics.2.kt deleted file mode 100644 index 45dad11dbf8..00000000000 --- a/compiler/testData/codegen/boxInline/capture/generics.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -inline fun mfun(arg: T, f: (T) -> R) : R { - return f(arg) -} - -inline fun doSmth(a: T): String { - return a.toString() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/capture/generics.1.kt b/compiler/testData/codegen/boxInline/capture/generics.kt similarity index 61% rename from compiler/testData/codegen/boxInline/capture/generics.1.kt rename to compiler/testData/codegen/boxInline/capture/generics.kt index 85f385625f5..925c4bf703e 100644 --- a/compiler/testData/codegen/boxInline/capture/generics.1.kt +++ b/compiler/testData/codegen/boxInline/capture/generics.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +inline fun mfun(arg: T, f: (T) -> R) : R { + return f(arg) +} + +inline fun doSmth(a: T): String { + return a.toString() +} + +// FILE: 2.kt + import test.* fun test1(s: Long): String { @@ -14,4 +28,4 @@ fun box(): String { if (result != "OK1111") return "fail1: ${result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.2.kt b/compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.2.kt deleted file mode 100644 index 353dd2dceaa..00000000000 --- a/compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -class InlineAll { - - inline fun inline(s: (Int, Double, Double, String, Long) -> String, - a1: Int, a2: Double, a3: Double, a4: String, a5: Long): String { - return s(a1, a2, a3, a4, a5) - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.1.kt b/compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt similarity index 90% rename from compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.1.kt rename to compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt index 718adfb1432..1122dc88f07 100644 --- a/compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.1.kt +++ b/compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +class InlineAll { + + inline fun inline(s: (Int, Double, Double, String, Long) -> String, + a1: Int, a2: Double, a3: Double, a4: String, a5: Long): String { + return s(a1, a2, a3, a4, a5) + } +} + +// FILE: 2.kt + fun testAll(): String { val inlineX = InlineAll() @@ -67,4 +79,4 @@ fun box(): String { if (testAllWithCapturedVar() != "112.013.014152122.023.02425H262728.0") return "testAllWithCapturedVar: ${testAllWithCapturedVar()}" if (testAllWithCapturedValAndVar() != "112.013.014152122.023.02425H262728.0") return "testAllWithCapturedVal: ${testAllWithCapturedValAndVar()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.2.kt b/compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.2.kt deleted file mode 100644 index 1665ae4ae5d..00000000000 --- a/compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.2.kt +++ /dev/null @@ -1,4 +0,0 @@ -inline fun inline(s: (Int, Double, Double, String, Long) -> String, - a1: Int, a2: Double, a3: Double, a4: String, a5: Long): String { - return s(a1, a2, a3, a4, a5) -} diff --git a/compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.1.kt b/compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt similarity index 90% rename from compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.1.kt rename to compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt index f6239940bad..6577399d232 100644 --- a/compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.1.kt +++ b/compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt @@ -1,3 +1,12 @@ +// FILE: 1.kt + +inline fun inline(s: (Int, Double, Double, String, Long) -> String, + a1: Int, a2: Double, a3: Double, a4: String, a5: Long): String { + return s(a1, a2, a3, a4, a5) +} + +// FILE: 2.kt + fun testAll(): String { return inline({ a1: Int, a2: Double, a3: Double, a4: String, a5: Long -> "" + a1 + a2 + a3 + a4 + a5}, @@ -59,4 +68,4 @@ fun box(): String { if (testAllWithCapturedVar() != "112.013.014152122.023.02425H262728.0") return "testAllWithCapturedVar: ${testAllWithCapturedVar()}" if (testAllWithCapturedValAndVar() != "112.013.014152122.023.02425H262728.0") return "testAllWithCapturedVal: ${testAllWithCapturedValAndVar()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/complex/closureChain.2.kt b/compiler/testData/codegen/boxInline/complex/closureChain.2.kt deleted file mode 100644 index e2f1f3b0914..00000000000 --- a/compiler/testData/codegen/boxInline/complex/closureChain.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -class Inline() { - - inline fun foo(closure1 : (l: Int) -> String, param: Int, closure2: String.() -> Int) : Int { - return closure1(param).closure2() - } -} - diff --git a/compiler/testData/codegen/boxInline/complex/closureChain.1.kt b/compiler/testData/codegen/boxInline/complex/closureChain.kt similarity index 52% rename from compiler/testData/codegen/boxInline/complex/closureChain.1.kt rename to compiler/testData/codegen/boxInline/complex/closureChain.kt index 16a625e4b24..369c9e65d6e 100644 --- a/compiler/testData/codegen/boxInline/complex/closureChain.1.kt +++ b/compiler/testData/codegen/boxInline/complex/closureChain.kt @@ -1,3 +1,14 @@ +// FILE: 1.kt + +class Inline() { + + inline fun foo(closure1 : (l: Int) -> String, param: Int, closure2: String.() -> Int) : Int { + return closure1(param).closure2() + } +} + +// FILE: 2.kt + fun test1(): Int { val inlineX = Inline() return inlineX.foo({ z: Int -> "" + z}, 25, fun String.(): Int = this.length) diff --git a/compiler/testData/codegen/boxInline/complex/forEachLine.1.kt b/compiler/testData/codegen/boxInline/complex/forEachLine.1.kt deleted file mode 100644 index 36546d0c85c..00000000000 --- a/compiler/testData/codegen/boxInline/complex/forEachLine.1.kt +++ /dev/null @@ -1,23 +0,0 @@ -import test.* -import java.util.* - - -fun sample(): Input { - return Input("Hello", "World"); -} - -fun testForEachLine() { - val list = ArrayList() - val reader = sample() - - reader.forEachLine{ - list.add(it) - } -} - - -fun box(): String { - testForEachLine() - - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/complex/forEachLine.2.kt b/compiler/testData/codegen/boxInline/complex/forEachLine.kt similarity index 59% rename from compiler/testData/codegen/boxInline/complex/forEachLine.2.kt rename to compiler/testData/codegen/boxInline/complex/forEachLine.kt index 7ef284b9886..5d2930bac37 100644 --- a/compiler/testData/codegen/boxInline/complex/forEachLine.2.kt +++ b/compiler/testData/codegen/boxInline/complex/forEachLine.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public class Input(val s1: String, val s2: String) { @@ -17,3 +19,29 @@ public inline fun Input.forEachLine(block: (String) -> Unit): Unit { public inline fun Input.useLines(block2: (Iterator) -> Unit): Unit { this.use{ block2(it.iterator()) } } + +// FILE: 2.kt + +import test.* +import java.util.* + + +fun sample(): Input { + return Input("Hello", "World"); +} + +fun testForEachLine() { + val list = ArrayList() + val reader = sample() + + reader.forEachLine{ + list.add(it) + } +} + + +fun box(): String { + testForEachLine() + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/complex/lambdaInLambda.1.kt b/compiler/testData/codegen/boxInline/complex/lambdaInLambda.1.kt deleted file mode 100644 index 0b6bdfea55a..00000000000 --- a/compiler/testData/codegen/boxInline/complex/lambdaInLambda.1.kt +++ /dev/null @@ -1,23 +0,0 @@ -import test.* -import java.util.* - - -fun sample(): Input { - return Input("Hello", "World"); -} - -fun testForEachLine() { - val list = ArrayList() - val reader = sample() - - reader.forEachLine{ - list.add("111") - } -} - - -fun box(): String { - testForEachLine() - - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/complex/lambdaInLambda.2.kt b/compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt similarity index 55% rename from compiler/testData/codegen/boxInline/complex/lambdaInLambda.2.kt rename to compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt index f362630297d..040d0e42818 100644 --- a/compiler/testData/codegen/boxInline/complex/lambdaInLambda.2.kt +++ b/compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public class Input(val s1: String, val s2: String) { @@ -17,3 +19,29 @@ public inline fun T.use2(block: ()-> R) : R { public inline fun Input.forEachLine(block: () -> Unit): Unit { use { use2 (block) } } + +// FILE: 2.kt + +import test.* +import java.util.* + + +fun sample(): Input { + return Input("Hello", "World"); +} + +fun testForEachLine() { + val list = ArrayList() + val reader = sample() + + reader.forEachLine{ + list.add("111") + } +} + + +fun box(): String { + testForEachLine() + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/complex/use.1.kt b/compiler/testData/codegen/boxInline/complex/use.1.kt deleted file mode 100644 index 9f674c2cbb7..00000000000 --- a/compiler/testData/codegen/boxInline/complex/use.1.kt +++ /dev/null @@ -1,22 +0,0 @@ -import test.* - - -fun Data.test1(d: Data) : Long { - val input2 = Input(this) - val input = Input(this) - return input.use{ - val output = Output(d) - output.use{ - input.copyTo(output, 10) - } - } -} - - -fun box(): String { - - val result = Data().test1(Data()) - if (result != 100.toLong()) return "test1: ${result}" - - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/complex/use.2.kt b/compiler/testData/codegen/boxInline/complex/use.kt similarity index 63% rename from compiler/testData/codegen/boxInline/complex/use.2.kt rename to compiler/testData/codegen/boxInline/complex/use.kt index 42f0ce1bfbd..97dc7fdfbd7 100644 --- a/compiler/testData/codegen/boxInline/complex/use.2.kt +++ b/compiler/testData/codegen/boxInline/complex/use.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public class Data() @@ -36,3 +38,28 @@ public inline fun T.use(block: (T)-> R) : R { public fun Input.copyTo(output: Output, size: Int): Long { return output.doOutput(this.data()).toLong() } + +// FILE: 2.kt + +import test.* + + +fun Data.test1(d: Data) : Long { + val input2 = Input(this) + val input = Input(this) + return input.use{ + val output = Output(d) + output.use{ + input.copyTo(output, 10) + } + } +} + + +fun box(): String { + + val result = Data().test1(Data()) + if (result != 100.toLong()) return "test1: ${result}" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/complex/with.2.kt b/compiler/testData/codegen/boxInline/complex/with.2.kt deleted file mode 100644 index 3f8034c0fa8..00000000000 --- a/compiler/testData/codegen/boxInline/complex/with.2.kt +++ /dev/null @@ -1,31 +0,0 @@ -package test - - -public class Data() - -public class Input(val d: Data) : Closeable { - public fun data() : Int = 100 -} -public class Output(val d: Data) : Closeable { - public fun doOutput(data: Int): Int = data -} - -public interface Closeable { - open public fun close() {} -} - -public inline fun use(block: ()-> R) : R { - return block() -} - -public fun useNoInline(block: ()-> R) : R { - return block() -} - - -public fun Input.copyTo(output: Output, size: Int): Long { - return output.doOutput(this.data()).toLong() -} - - -public inline fun with2(receiver : T, crossinline body : T.() -> Unit) : Unit = {receiver.body()}() diff --git a/compiler/testData/codegen/boxInline/complex/with.1.kt b/compiler/testData/codegen/boxInline/complex/with.kt similarity index 57% rename from compiler/testData/codegen/boxInline/complex/with.1.kt rename to compiler/testData/codegen/boxInline/complex/with.kt index 72a04ac8a21..94a8af3ac44 100644 --- a/compiler/testData/codegen/boxInline/complex/with.1.kt +++ b/compiler/testData/codegen/boxInline/complex/with.kt @@ -1,3 +1,39 @@ +// FILE: 1.kt + +package test + + +public class Data() + +public class Input(val d: Data) : Closeable { + public fun data() : Int = 100 +} +public class Output(val d: Data) : Closeable { + public fun doOutput(data: Int): Int = data +} + +public interface Closeable { + open public fun close() {} +} + +public inline fun use(block: ()-> R) : R { + return block() +} + +public fun useNoInline(block: ()-> R) : R { + return block() +} + + +public fun Input.copyTo(output: Output, size: Int): Long { + return output.doOutput(this.data()).toLong() +} + + +public inline fun with2(receiver : T, crossinline body : T.() -> Unit) : Unit = {receiver.body()}() + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* diff --git a/compiler/testData/codegen/boxInline/complexStack/asCheck.1.kt b/compiler/testData/codegen/boxInline/complexStack/asCheck.1.kt deleted file mode 100644 index 9ee32276d63..00000000000 --- a/compiler/testData/codegen/boxInline/complexStack/asCheck.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return ContentTypeByExtension.processRecords { ext -> ext } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/complexStack/asCheck.2.kt b/compiler/testData/codegen/boxInline/complexStack/asCheck.kt similarity index 66% rename from compiler/testData/codegen/boxInline/complexStack/asCheck.2.kt rename to compiler/testData/codegen/boxInline/complexStack/asCheck.kt index cc97b4127e8..d5a4474f4d8 100644 --- a/compiler/testData/codegen/boxInline/complexStack/asCheck.2.kt +++ b/compiler/testData/codegen/boxInline/complexStack/asCheck.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test object ContentTypeByExtension { @@ -15,4 +17,12 @@ inline fun A.toLowerCase(): String = (this as B).value open class A -open class B(val value: String) : A() \ No newline at end of file +open class B(val value: String) : A() + +// FILE: 2.kt + +import test.* + +fun box(): String { + return ContentTypeByExtension.processRecords { ext -> ext } +} diff --git a/compiler/testData/codegen/boxInline/complexStack/asCheck2.1.kt b/compiler/testData/codegen/boxInline/complexStack/asCheck2.1.kt deleted file mode 100644 index 9ee32276d63..00000000000 --- a/compiler/testData/codegen/boxInline/complexStack/asCheck2.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return ContentTypeByExtension.processRecords { ext -> ext } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/complexStack/asCheck2.2.kt b/compiler/testData/codegen/boxInline/complexStack/asCheck2.kt similarity index 64% rename from compiler/testData/codegen/boxInline/complexStack/asCheck2.2.kt rename to compiler/testData/codegen/boxInline/complexStack/asCheck2.kt index 4c2721f48c3..18a0bd3273d 100644 --- a/compiler/testData/codegen/boxInline/complexStack/asCheck2.2.kt +++ b/compiler/testData/codegen/boxInline/complexStack/asCheck2.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test object ContentTypeByExtension { @@ -15,4 +17,12 @@ inline fun A.toLowerCase(): String = (this as B).value open class A -open class B(val value: String) : A() \ No newline at end of file +open class B(val value: String) : A() + +// FILE: 2.kt + +import test.* + +fun box(): String { + return ContentTypeByExtension.processRecords { ext -> ext } +} diff --git a/compiler/testData/codegen/boxInline/complexStack/simple.1.kt b/compiler/testData/codegen/boxInline/complexStack/simple.1.kt deleted file mode 100644 index 603b3f0ca67..00000000000 --- a/compiler/testData/codegen/boxInline/complexStack/simple.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return processRecords { ext -> ext + "K" } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/complexStack/simple.2.kt b/compiler/testData/codegen/boxInline/complexStack/simple.2.kt deleted file mode 100644 index 9917f01aef1..00000000000 --- a/compiler/testData/codegen/boxInline/complexStack/simple.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun foo(x: String) = x - -inline fun processRecords(block: (String) -> String) = block(foo("O")) \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/complexStack/simple.kt b/compiler/testData/codegen/boxInline/complexStack/simple.kt new file mode 100644 index 00000000000..616f28638a4 --- /dev/null +++ b/compiler/testData/codegen/boxInline/complexStack/simple.kt @@ -0,0 +1,15 @@ +// FILE: 1.kt + +package test + +inline fun foo(x: String) = x + +inline fun processRecords(block: (String) -> String) = block(foo("O")) + +// FILE: 2.kt + +import test.* + +fun box(): String { + return processRecords { ext -> ext + "K" } +} diff --git a/compiler/testData/codegen/boxInline/complexStack/simple2.1.kt b/compiler/testData/codegen/boxInline/complexStack/simple2.1.kt deleted file mode 100644 index 34d8b03cb7a..00000000000 --- a/compiler/testData/codegen/boxInline/complexStack/simple2.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return processRecords { "O" + it } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/complexStack/simple2.2.kt b/compiler/testData/codegen/boxInline/complexStack/simple2.kt similarity index 63% rename from compiler/testData/codegen/boxInline/complexStack/simple2.2.kt rename to compiler/testData/codegen/boxInline/complexStack/simple2.kt index 906a69bb551..500ee47930d 100644 --- a/compiler/testData/codegen/boxInline/complexStack/simple2.2.kt +++ b/compiler/testData/codegen/boxInline/complexStack/simple2.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test inline fun foo(x: String) = x @@ -9,3 +11,11 @@ class A { inline fun processRecords(block: (String) -> String): String { return A().test(block(foo("K"))) } + +// FILE: 2.kt + +import test.* + +fun box(): String { + return processRecords { "O" + it } +} diff --git a/compiler/testData/codegen/boxInline/complexStack/simple3.1.kt b/compiler/testData/codegen/boxInline/complexStack/simple3.1.kt deleted file mode 100644 index 4ecac599c3a..00000000000 --- a/compiler/testData/codegen/boxInline/complexStack/simple3.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - val result = processRecords { "B" + it } - - return if (result == "BOK1") "OK" else "fail: $result" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/complexStack/simple3.2.kt b/compiler/testData/codegen/boxInline/complexStack/simple3.kt similarity index 55% rename from compiler/testData/codegen/boxInline/complexStack/simple3.2.kt rename to compiler/testData/codegen/boxInline/complexStack/simple3.kt index 78f4ee4d615..1604d306de2 100644 --- a/compiler/testData/codegen/boxInline/complexStack/simple3.2.kt +++ b/compiler/testData/codegen/boxInline/complexStack/simple3.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test inline fun foo(x: String, y: String) = x + y @@ -9,3 +11,13 @@ class A { inline fun processRecords(block: (String) -> String): String { return A().test(block(foo("O", foo("K", "1")))) } + +// FILE: 2.kt + +import test.* + +fun box(): String { + val result = processRecords { "B" + it } + + return if (result == "BOK1") "OK" else "fail: $result" +} diff --git a/compiler/testData/codegen/boxInline/complexStack/simple4.1.kt b/compiler/testData/codegen/boxInline/complexStack/simple4.1.kt deleted file mode 100644 index 2d54cb809d3..00000000000 --- a/compiler/testData/codegen/boxInline/complexStack/simple4.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return processRecords { a, b -> a + b} -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/complexStack/simple4.2.kt b/compiler/testData/codegen/boxInline/complexStack/simple4.kt similarity index 64% rename from compiler/testData/codegen/boxInline/complexStack/simple4.2.kt rename to compiler/testData/codegen/boxInline/complexStack/simple4.kt index 372e25c3600..cab0e2460d3 100644 --- a/compiler/testData/codegen/boxInline/complexStack/simple4.2.kt +++ b/compiler/testData/codegen/boxInline/complexStack/simple4.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test inline fun foo(x: String) = x @@ -8,3 +10,11 @@ fun test(a: String, s: String) = s inline fun processRecords(block: (String, String) -> String): String { return test("stub", block(foo("O"), foo("K"))) } + +// FILE: 2.kt + +import test.* + +fun box(): String { + return processRecords { a, b -> a + b} +} diff --git a/compiler/testData/codegen/boxInline/complexStack/simpleExtension.1.kt b/compiler/testData/codegen/boxInline/complexStack/simpleExtension.1.kt deleted file mode 100644 index db5037dcde9..00000000000 --- a/compiler/testData/codegen/boxInline/complexStack/simpleExtension.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String? { - return processRecords("O") { this + "K" } -} diff --git a/compiler/testData/codegen/boxInline/complexStack/simpleExtension.2.kt b/compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt similarity index 54% rename from compiler/testData/codegen/boxInline/complexStack/simpleExtension.2.kt rename to compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt index 278ef6cdb1d..f8e565554ae 100644 --- a/compiler/testData/codegen/boxInline/complexStack/simpleExtension.2.kt +++ b/compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt @@ -1,5 +1,15 @@ +// FILE: 1.kt + package test inline fun foo(x: String) = x inline fun processRecords(s: String?, block: String.(String) -> String) = s?.block(foo("O")) + +// FILE: 2.kt + +import test.* + +fun box(): String? { + return processRecords("O") { this + "K" } +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.2.kt b/compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.2.kt deleted file mode 100644 index e2255174276..00000000000 --- a/compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.2.kt +++ /dev/null @@ -1,21 +0,0 @@ -package test - -inline public fun String.run(p1: String? = null): String { - return this + p1 -} - -inline public fun String.run(p1: String = "", lambda: (a: String, b: Int) -> String, p2: Int = 0): String { - return lambda(p1, p2) + this -} - -public class Z(val value: Int = 0) { - - inline public fun String.run(p1: String? = null): String? { - return this + p1 - } - - inline public fun String.run(p1: String = "", lambda: (a: String, b: Int) -> String, p2: Int = 0): String { - return lambda(p1, p2) + this - } - -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.1.kt b/compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt similarity index 61% rename from compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.1.kt rename to compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt index 41dcb7f91f8..edb0b0b2bd1 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.1.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt @@ -1,3 +1,29 @@ +// FILE: 1.kt + +package test + +inline public fun String.run(p1: String? = null): String { + return this + p1 +} + +inline public fun String.run(p1: String = "", lambda: (a: String, b: Int) -> String, p2: Int = 0): String { + return lambda(p1, p2) + this +} + +public class Z(val value: Int = 0) { + + inline public fun String.run(p1: String? = null): String? { + return this + p1 + } + + inline public fun String.run(p1: String = "", lambda: (a: String, b: Int) -> String, p2: Int = 0): String { + return lambda(p1, p2) + this + } + +} + +// FILE: 2.kt + import test.* fun testExtensionInClass() : String { diff --git a/compiler/testData/codegen/boxInline/defaultValues/defaultMethod.2.kt b/compiler/testData/codegen/boxInline/defaultValues/defaultMethod.2.kt deleted file mode 100644 index de98a85e1b2..00000000000 --- a/compiler/testData/codegen/boxInline/defaultValues/defaultMethod.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - - -inline fun simpleFun(arg: String = "O", lambda: (String) -> T): T { - return lambda(arg) -} - - -inline fun simpleFunR(lambda: (String) -> T, arg: String = "O"): T { - return lambda(arg) -} - diff --git a/compiler/testData/codegen/boxInline/defaultValues/defaultMethod.1.kt b/compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt similarity index 63% rename from compiler/testData/codegen/boxInline/defaultValues/defaultMethod.1.kt rename to compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt index 0a495bba718..398f6768a0f 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/defaultMethod.1.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt @@ -1,3 +1,19 @@ +// FILE: 1.kt + +package test + + +inline fun simpleFun(arg: String = "O", lambda: (String) -> T): T { + return lambda(arg) +} + + +inline fun simpleFunR(lambda: (String) -> T, arg: String = "O"): T { + return lambda(arg) +} + +// FILE: 2.kt + import test.* fun simple(): String { @@ -19,4 +35,4 @@ fun box(): String { if (result != "OOKK") return "fail2: ${result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.1.kt b/compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.1.kt deleted file mode 100644 index a6c96bb9bf8..00000000000 --- a/compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.1.kt +++ /dev/null @@ -1,13 +0,0 @@ -import test.* - -fun box(): String { - if (Z().run() != "null0") return "fail 1: ${Z().run()}" - - if (Z().run("OK") != "OK0") return "fail 2" - - if (Z().run("OK", { a, b -> a + b }, 1) != "OK1") return "fail 3" - - if (Z().run(lambda = { a: String, b: Int -> a + b }) != "0") return "fail 4" - - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.2.kt b/compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.2.kt deleted file mode 100644 index a881a5988db..00000000000 --- a/compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.2.kt +++ /dev/null @@ -1,13 +0,0 @@ -package test - -public class Z(public val value: Int = 0) { - - inline public fun run(p1: String? = null): String? { - return p1 + value - } - - - inline public fun run(p1: String = "", lambda: (a: String, b: Int) -> String, p2: Int = 0): String { - return lambda(p1, p2) - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt b/compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt new file mode 100644 index 00000000000..912517ea563 --- /dev/null +++ b/compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt @@ -0,0 +1,31 @@ +// FILE: 1.kt + +package test + +public class Z(public val value: Int = 0) { + + inline public fun run(p1: String? = null): String? { + return p1 + value + } + + + inline public fun run(p1: String = "", lambda: (a: String, b: Int) -> String, p2: Int = 0): String { + return lambda(p1, p2) + } +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + if (Z().run() != "null0") return "fail 1: ${Z().run()}" + + if (Z().run("OK") != "OK0") return "fail 2" + + if (Z().run("OK", { a, b -> a + b }, 1) != "OK1") return "fail 3" + + if (Z().run(lambda = { a: String, b: Int -> a + b }) != "0") return "fail 4" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.1.kt b/compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.1.kt deleted file mode 100644 index f4929184200..00000000000 --- a/compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.1.kt +++ /dev/null @@ -1,9 +0,0 @@ -import test.* - -fun box(): String { - val z = "OK".b { a, b -> - a + b - } - - return if (z == "s1OK") "OK" else "fail $z" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.2.kt b/compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.2.kt deleted file mode 100644 index 5b81bd24492..00000000000 --- a/compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun a(s1: String = "s1", s2: String = "s2", body: (a1: String, a2: String) -> String) = body(s1, s2) - -inline fun String.b(body: (a1: String, a2: String) -> String) = a(s2 = this, body = body) \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt b/compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt new file mode 100644 index 00000000000..948111cf500 --- /dev/null +++ b/compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt @@ -0,0 +1,19 @@ +// FILE: 1.kt + +package test + +inline fun a(s1: String = "s1", s2: String = "s2", body: (a1: String, a2: String) -> String) = body(s1, s2) + +inline fun String.b(body: (a1: String, a2: String) -> String) = a(s2 = this, body = body) + +// FILE: 2.kt + +import test.* + +fun box(): String { + val z = "OK".b { a, b -> + a + b + } + + return if (z == "s1OK") "OK" else "fail $z" +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.2.kt b/compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.2.kt deleted file mode 100644 index f0ff8732670..00000000000 --- a/compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun getStringInline(): String { - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.1.kt b/compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt similarity index 84% rename from compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.1.kt rename to compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt index 938d673b798..191d6171085 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.1.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun getStringInline(): String { + return "OK" +} + +// FILE: 2.kt + import test.* fun testCompilation(arg: String = getStringInline()): String { @@ -23,4 +33,4 @@ fun box(): String { if (result != "OKOK") return "fail4: ${result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/kt5685.1.kt b/compiler/testData/codegen/boxInline/defaultValues/kt5685.1.kt deleted file mode 100644 index 07b3ab5a4a2..00000000000 --- a/compiler/testData/codegen/boxInline/defaultValues/kt5685.1.kt +++ /dev/null @@ -1,10 +0,0 @@ -import test.* - -fun box(): String { - var s1 = "" - val s2 = Measurements().measure("K") { - s1 = "O" - } - - return s1 + s2 -} diff --git a/compiler/testData/codegen/boxInline/defaultValues/kt5685.2.kt b/compiler/testData/codegen/boxInline/defaultValues/kt5685.kt similarity index 50% rename from compiler/testData/codegen/boxInline/defaultValues/kt5685.2.kt rename to compiler/testData/codegen/boxInline/defaultValues/kt5685.kt index 9337adede03..287dd42f56b 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/kt5685.2.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/kt5685.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class Measurements @@ -6,4 +8,17 @@ class Measurements body() return key } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var s1 = "" + val s2 = Measurements().measure("K") { + s1 = "O" + } + + return s1 + s2 +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.2.kt b/compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.2.kt deleted file mode 100644 index 21a2c0430b8..00000000000 --- a/compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.2.kt +++ /dev/null @@ -1,17 +0,0 @@ -package test - -inline fun emptyFun(arg: String = "O") { - -} - -inline fun simpleFun(arg: String = "O"): String { - val r = arg; - return r; -} - - -inline fun simpleDoubleFun(arg: Double = 1.0): Double { - val r = arg + 1; - return r; -} - diff --git a/compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.1.kt b/compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt similarity index 62% rename from compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.1.kt rename to compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt index c48b5dedadc..6e401f286af 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.1.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt @@ -1,3 +1,24 @@ +// FILE: 1.kt + +package test + +inline fun emptyFun(arg: String = "O") { + +} + +inline fun simpleFun(arg: String = "O"): String { + val r = arg; + return r; +} + + +inline fun simpleDoubleFun(arg: Double = 1.0): Double { + val r = arg + 1; + return r; +} + +// FILE: 2.kt + import test.* fun testCompilation(): String { @@ -22,4 +43,4 @@ fun box(): String { if (result2 != 2.0 + 1.0) return "fail3: ${result2}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.2.kt b/compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.2.kt deleted file mode 100644 index 24493b57a7a..00000000000 --- a/compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.2.kt +++ /dev/null @@ -1,3 +0,0 @@ -package test - -inline fun call(s: () -> R) = s() diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.1.kt b/compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt similarity index 82% rename from compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.1.kt rename to compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt index c6d34486426..8cd7b82ae05 100644 --- a/compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.1.kt +++ b/compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt @@ -1,3 +1,11 @@ +// FILE: 1.kt + +package test + +inline fun call(s: () -> R) = s() + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.2.kt b/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.2.kt deleted file mode 100644 index 3a1cc9ee511..00000000000 --- a/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun call(s: () -> R) = s() - -inline fun test(crossinline z: () -> String) = { z() } diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.1.kt b/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt similarity index 84% rename from compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.1.kt rename to compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt index 68f78b9daad..7dee610fb73 100644 --- a/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.1.kt +++ b/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun call(s: () -> R) = s() + +inline fun test(crossinline z: () -> String) = { z() } + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.2.kt b/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.2.kt deleted file mode 100644 index d695be1d81a..00000000000 --- a/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun call(crossinline s: () -> R) = { s() }() - -inline fun test(crossinline z: () -> String) = { z() } diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.1.kt b/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt similarity index 83% rename from compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.1.kt rename to compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt index ce1cac4ac7c..1f6814bd70c 100644 --- a/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.1.kt +++ b/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun call(crossinline s: () -> R) = { s() }() + +inline fun test(crossinline z: () -> String) = { z() } + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.2.kt b/compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.2.kt deleted file mode 100644 index 087f4f14757..00000000000 --- a/compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package test - -interface Z { - fun a(): String -} - -inline fun test(crossinline z: () -> String) = - object : Z { - override fun a() = z() - } diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.1.kt b/compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt similarity index 66% rename from compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.1.kt rename to compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt index 1e8c4dc4aa9..56df07383e3 100644 --- a/compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.1.kt +++ b/compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt @@ -1,3 +1,18 @@ +// FILE: 1.kt + +package test + +interface Z { + fun a(): String +} + +inline fun test(crossinline z: () -> String) = + object : Z { + override fun a() = z() + } + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.2.kt b/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.2.kt deleted file mode 100644 index 74cb6e99e7f..00000000000 --- a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.2.kt +++ /dev/null @@ -1,13 +0,0 @@ -package test - -interface Z { - fun a() : String -} - -inline fun test(crossinline z: () -> String) = - object : Z { - - val p = z() - - override fun a() = p - } diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.1.kt b/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt similarity index 75% rename from compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.1.kt rename to compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt index 9bec05970ba..9526c4029a6 100644 --- a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.1.kt +++ b/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt @@ -1,3 +1,21 @@ +// FILE: 1.kt + +package test + +interface Z { + fun a() : String +} + +inline fun test(crossinline z: () -> String) = + object : Z { + + val p = z() + + override fun a() = p + } + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.2.kt b/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.2.kt deleted file mode 100644 index 9dfa395390b..00000000000 --- a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.2.kt +++ /dev/null @@ -1,18 +0,0 @@ -package test - -interface Z { - fun a() : T -} - -inline fun test(crossinline z: () -> String) = - object : Z> { - - val p: Z = object : Z { - - val p2 = z() - - override fun a() = p2 - } - - override fun a() = p - } diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.1.kt b/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt similarity index 71% rename from compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.1.kt rename to compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt index ed928ad306d..2bae1f9132f 100644 --- a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.1.kt +++ b/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt @@ -1,3 +1,26 @@ +// FILE: 1.kt + +package test + +interface Z { + fun a() : T +} + +inline fun test(crossinline z: () -> String) = + object : Z> { + + val p: Z = object : Z { + + val p2 = z() + + override fun a() = p2 + } + + override fun a() = p + } + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.2.kt b/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.2.kt deleted file mode 100644 index dfb5b81869a..00000000000 --- a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.2.kt +++ /dev/null @@ -1,16 +0,0 @@ -package test - -interface Z { - fun a() : String -} - -inline fun test(crossinline z: () -> String) = - object : Z { - - val p = z() - - override fun a() = p - } - - -inline fun call(crossinline z: () -> T) = z() \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.1.kt b/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt similarity index 73% rename from compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.1.kt rename to compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt index e6e3876e39c..5d49ec5a511 100644 --- a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.1.kt +++ b/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt @@ -1,3 +1,24 @@ +// FILE: 1.kt + +package test + +interface Z { + fun a() : String +} + +inline fun test(crossinline z: () -> String) = + object : Z { + + val p = z() + + override fun a() = p + } + + +inline fun call(crossinline z: () -> T) = z() + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/functionExpression/extension.2.kt b/compiler/testData/codegen/boxInline/functionExpression/extension.2.kt deleted file mode 100644 index 55e2c13f94a..00000000000 --- a/compiler/testData/codegen/boxInline/functionExpression/extension.2.kt +++ /dev/null @@ -1,29 +0,0 @@ -inline fun Inline.calcExt(s: (Int) -> Int, p: Int) : Int { - return s(p) -} - -inline fun Inline.calcExt2(s: Int.() -> Int, p: Int) : Int { - return p.s() -} - -class InlineX(val value : Int) {} - -class Inline(val res: Int) { - - inline fun InlineX.calcInt(s: (Int, Int) -> Int) : Int { - return s(res, this.value) - } - - inline fun Double.calcDouble(s: (Int, Double) -> Double) : Double { - return s(res, this) - } - - fun doWork(l : InlineX) : Int { - return l.calcInt(fun (a: Int, b: Int) = a + b) - } - - fun doWorkWithDouble(s : Double) : Double { - return s.calcDouble(fun (a: Int, b: Double) = a + b) - } - -} diff --git a/compiler/testData/codegen/boxInline/functionExpression/extension.1.kt b/compiler/testData/codegen/boxInline/functionExpression/extension.kt similarity index 55% rename from compiler/testData/codegen/boxInline/functionExpression/extension.1.kt rename to compiler/testData/codegen/boxInline/functionExpression/extension.kt index b039aa56257..960746f0d0a 100644 --- a/compiler/testData/codegen/boxInline/functionExpression/extension.1.kt +++ b/compiler/testData/codegen/boxInline/functionExpression/extension.kt @@ -1,3 +1,37 @@ +// FILE: 1.kt + +inline fun Inline.calcExt(s: (Int) -> Int, p: Int) : Int { + return s(p) +} + +inline fun Inline.calcExt2(s: Int.() -> Int, p: Int) : Int { + return p.s() +} + +class InlineX(val value : Int) {} + +class Inline(val res: Int) { + + inline fun InlineX.calcInt(s: (Int, Int) -> Int) : Int { + return s(res, this.value) + } + + inline fun Double.calcDouble(s: (Int, Double) -> Double) : Double { + return s(res, this) + } + + fun doWork(l : InlineX) : Int { + return l.calcInt(fun (a: Int, b: Int) = a + b) + } + + fun doWorkWithDouble(s : Double) : Double { + return s.calcDouble(fun (a: Int, b: Double) = a + b) + } + +} + +// FILE: 2.kt + fun test1(): Int { val inlineX = Inline(9) return inlineX.calcExt(fun(z: Int) = z, 25) @@ -34,4 +68,4 @@ fun box(): String { if (test5() != 20.0) return "test5: ${test5()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/innerClasses/innerLambda.1.kt b/compiler/testData/codegen/boxInline/innerClasses/innerLambda.1.kt deleted file mode 100644 index 70f6d45efd0..00000000000 --- a/compiler/testData/codegen/boxInline/innerClasses/innerLambda.1.kt +++ /dev/null @@ -1,10 +0,0 @@ -import test.* - -fun box(): String { - val x1 = foo1()() - if (x1 != "OK") return "fail 1: $x1" - - foo2()().run() - - return test.sideEffects -} diff --git a/compiler/testData/codegen/boxInline/innerClasses/innerLambda.2.kt b/compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt similarity index 51% rename from compiler/testData/codegen/boxInline/innerClasses/innerLambda.2.kt rename to compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt index a09d3eb796f..c1a7fbb38ab 100644 --- a/compiler/testData/codegen/boxInline/innerClasses/innerLambda.2.kt +++ b/compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test inline fun foo1() = run { @@ -15,3 +17,16 @@ inline fun foo2() = run { } } } + +// FILE: 2.kt + +import test.* + +fun box(): String { + val x1 = foo1()() + if (x1 != "OK") return "fail 1: $x1" + + foo2()().run() + + return test.sideEffects +} diff --git a/compiler/testData/codegen/boxInline/innerClasses/kt10259.2.kt b/compiler/testData/codegen/boxInline/innerClasses/kt10259.2.kt deleted file mode 100644 index e82c338479c..00000000000 --- a/compiler/testData/codegen/boxInline/innerClasses/kt10259.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun test(s: () -> Unit) { - s() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/innerClasses/kt10259.1.kt b/compiler/testData/codegen/boxInline/innerClasses/kt10259.kt similarity index 86% rename from compiler/testData/codegen/boxInline/innerClasses/kt10259.1.kt rename to compiler/testData/codegen/boxInline/innerClasses/kt10259.kt index c1c7854b88d..edd5e0cd336 100644 --- a/compiler/testData/codegen/boxInline/innerClasses/kt10259.1.kt +++ b/compiler/testData/codegen/boxInline/innerClasses/kt10259.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun test(s: () -> Unit) { + s() +} + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.1.kt b/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.1.kt deleted file mode 100644 index a98c23be44c..00000000000 --- a/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.1.kt +++ /dev/null @@ -1,13 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import zzz.* - -fun box(): String { - - val p = { calc { 11 }} () - - val z = { calc { 12 }}() - - if (p == z) return "fail" - - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.2.kt b/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.2.kt deleted file mode 100644 index 8def24f88fe..00000000000 --- a/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package zzz - - -inline fun calc(crossinline lambda: () -> Int): Int { - return doCalc { lambda() } -} - -fun doCalc(lambda2: () -> Int): Int { - return lambda2() -} diff --git a/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt b/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt new file mode 100644 index 00000000000..6b77f48e346 --- /dev/null +++ b/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt @@ -0,0 +1,28 @@ +// FILE: 1.kt + +package zzz + + +inline fun calc(crossinline lambda: () -> Int): Int { + return doCalc { lambda() } +} + +fun doCalc(lambda2: () -> Int): Int { + return lambda2() +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import zzz.* + +fun box(): String { + + val p = { calc { 11 }} () + + val z = { calc { 12 }}() + + if (p == z) return "fail" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.2.kt b/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.2.kt deleted file mode 100644 index c313fe03948..00000000000 --- a/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test -var s: Int = 1; - -inline fun Int.inlineMethod() : Int { - noInlineLambda() - return noInlineLambda() -} - -inline fun Int.noInlineLambda() = { s++ } () diff --git a/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.1.kt b/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt similarity index 50% rename from compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.1.kt rename to compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt index 420074aa930..97ac05955d3 100644 --- a/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.1.kt +++ b/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test +var s: Int = 1; + +inline fun Int.inlineMethod() : Int { + noInlineLambda() + return noInlineLambda() +} + +inline fun Int.noInlineLambda() = { s++ } () + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* fun test1(): Int { @@ -9,4 +23,4 @@ fun box(): String { if (result != 2) return "test1: ${result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.2.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.2.kt deleted file mode 100644 index 6a5cf778de5..00000000000 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -inline fun doSmth(a: T) : String { - return {a.toString()}() -} - -inline fun doSmth2(a: T) : String { - return {{a.toString()}()}() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.1.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt similarity index 64% rename from compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.1.kt rename to compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt index 98f7acdc2f0..0d4a9e06dba 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.1.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +inline fun doSmth(a: T) : String { + return {a.toString()}() +} + +inline fun doSmth2(a: T) : String { + return {{a.toString()}()}() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -17,4 +31,4 @@ fun box(): String { if (result != "11") return "fail2: ${result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.2.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.2.kt deleted file mode 100644 index 36b3a560486..00000000000 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -inline fun mfun(f: () -> R) { - f() -} - -fun noInline(suffix: String, l: (s: String) -> Unit) { - l(suffix) -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.1.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt similarity index 71% rename from compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.1.kt rename to compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt index 13a8b233387..894a09d203d 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.1.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +inline fun mfun(f: () -> R) { + f() +} + +fun noInline(suffix: String, l: (s: String) -> Unit) { + l(suffix) +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* import java.util.* @@ -20,4 +34,4 @@ fun box(): String { if (test1("nostart") != "fail") return "fail2" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.2.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.2.kt deleted file mode 100644 index b539a8231a1..00000000000 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.2.kt +++ /dev/null @@ -1,13 +0,0 @@ -package test - -fun concat(suffix: String, l: (s: String) -> Unit) { - l(suffix) -} - -fun noInlineFun(arg: T, f: (T) -> Unit) { - f(arg) -} - -inline fun doSmth(a: String): String { - return a.toString() -} diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.1.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt similarity index 83% rename from compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.1.kt rename to compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt index 77ec6984b2e..86aab34cb6d 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.1.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt @@ -1,3 +1,21 @@ +// FILE: 1.kt + +package test + +fun concat(suffix: String, l: (s: String) -> Unit) { + l(suffix) +} + +fun noInlineFun(arg: T, f: (T) -> Unit) { + f(arg) +} + +inline fun doSmth(a: String): String { + return a.toString() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -51,4 +69,4 @@ fun box(): String { if (test22({"start"}) != "start") return "fail5: ${test22({"start"})}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.2.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.2.kt deleted file mode 100644 index fe9834fe317..00000000000 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.2.kt +++ /dev/null @@ -1,6 +0,0 @@ -package test - - -inline fun call(crossinline f: () -> R) : R { - return {f()} () -} diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.1.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt similarity index 76% rename from compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.1.kt rename to compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt index 7eca801a40a..80e630ccc3b 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.1.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt @@ -1,3 +1,14 @@ +// FILE: 1.kt + +package test + + +inline fun call(crossinline f: () -> R) : R { + return {f()} () +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -21,4 +32,4 @@ fun box(): String { if (result2 != 2) return "fail2: ${result2}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.2.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.2.kt deleted file mode 100644 index f6e4986b3c3..00000000000 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.2.kt +++ /dev/null @@ -1,17 +0,0 @@ -package test - - -inline fun doWork(crossinline job: ()-> R) : R { - val k = 10; - return notInline({k; job()}) -} - -inline fun doWork(crossinline job: ()-> R, crossinline job2: () -> R) : R { - val k = 10; - return notInline({k; job(); job2()}) -} - -fun notInline(job: ()-> R) : R { - return job() -} - diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.1.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt similarity index 66% rename from compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.1.kt rename to compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt index de432a39193..3cdd3687bf2 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.1.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt @@ -1,3 +1,24 @@ +// FILE: 1.kt + +package test + + +inline fun doWork(crossinline job: ()-> R) : R { + val k = 10; + return notInline({k; job()}) +} + +inline fun doWork(crossinline job: ()-> R, crossinline job2: () -> R) : R { + val k = 10; + return notInline({k; job(); job2()}) +} + +fun notInline(job: ()-> R) : R { + return job() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -20,4 +41,4 @@ fun box(): String { if (testSameCaptured{result += 1111} != "OK") return "test2 : ${testSameCaptured{result = 1111}}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.2.kt b/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.2.kt deleted file mode 100644 index d1f197c475e..00000000000 --- a/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - -public class Data(val value: Int) - -public class Input(val d: Data) { - public fun data() : Int = 100 -} - -public inline fun use(block: ()-> R) : R { - return block() -} - diff --git a/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.1.kt b/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt similarity index 62% rename from compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.1.kt rename to compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt index f0f4bea4894..d77e6f9f1a4 100644 --- a/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.1.kt +++ b/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt @@ -1,3 +1,19 @@ +// FILE: 1.kt + +package test + +public class Data(val value: Int) + +public class Input(val d: Data) { + public fun data() : Int = 100 +} + +public inline fun use(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* diff --git a/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.1.kt b/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.1.kt deleted file mode 100644 index 074ea8d2298..00000000000 --- a/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import a.foo -import a.inlineOnly - -fun box(): String { - if (!a.inlineOnly("OK")) return "fail 1" - return foo { "OK" } -} diff --git a/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.2.kt b/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.2.kt deleted file mode 100644 index df35ba2f0ec..00000000000 --- a/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.2.kt +++ /dev/null @@ -1,8 +0,0 @@ -@file:[JvmName("MultifileClass") JvmMultifileClass] -package a - -inline fun foo(body: () -> String): String = bar(body()) - -public fun bar(x: String): String = x - -inline fun inlineOnly(x: Any?): Boolean = x is T \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt b/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt new file mode 100644 index 00000000000..d9f92d8c835 --- /dev/null +++ b/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt @@ -0,0 +1,20 @@ +// FILE: 1.kt + +@file:[JvmName("MultifileClass") JvmMultifileClass] +package a + +inline fun foo(body: () -> String): String = bar(body()) + +public fun bar(x: String): String = x + +inline fun inlineOnly(x: Any?): Boolean = x is T + +// FILE: 2.kt + +import a.foo +import a.inlineOnly + +fun box(): String { + if (!a.inlineOnly("OK")) return "fail 1" + return foo { "OK" } +} diff --git a/compiler/testData/codegen/boxInline/noInline/extensionReceiver.1.kt b/compiler/testData/codegen/boxInline/noInline/extensionReceiver.1.kt deleted file mode 100644 index 09828393d5e..00000000000 --- a/compiler/testData/codegen/boxInline/noInline/extensionReceiver.1.kt +++ /dev/null @@ -1,11 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING - -fun box(): String { - val res = { "OK" }.test()() - if (res != "OKOKOK") return "fail 1: $res" - - val res2 = { "OK" }.extensionNoInline().subSequence(0, 2) - if (res2 != "OK") return "fail 2: $res2" - - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/noInline/extensionReceiver.2.kt b/compiler/testData/codegen/boxInline/noInline/extensionReceiver.2.kt deleted file mode 100644 index a1f5bac2d0c..00000000000 --- a/compiler/testData/codegen/boxInline/noInline/extensionReceiver.2.kt +++ /dev/null @@ -1,4 +0,0 @@ -inline fun (() -> String).test(): (() -> String) = { invoke() + this.invoke() + this() } - -// call this.hashCode() guarantees that extension receiver is noinline by default -inline fun (() -> String).extensionNoInline(): String = this() + (this.hashCode().toString()) diff --git a/compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt b/compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt new file mode 100644 index 00000000000..40555a42091 --- /dev/null +++ b/compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt @@ -0,0 +1,20 @@ +// FILE: 1.kt + +inline fun (() -> String).test(): (() -> String) = { invoke() + this.invoke() + this() } + +// call this.hashCode() guarantees that extension receiver is noinline by default +inline fun (() -> String).extensionNoInline(): String = this() + (this.hashCode().toString()) + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING + +fun box(): String { + val res = { "OK" }.test()() + if (res != "OKOKOK") return "fail 1: $res" + + val res2 = { "OK" }.extensionNoInline().subSequence(0, 2) + if (res2 != "OK") return "fail 2: $res2" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.2.kt b/compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.2.kt deleted file mode 100644 index fa1a43fefce..00000000000 --- a/compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.2.kt +++ /dev/null @@ -1,3 +0,0 @@ -inline fun test(p: T) { - p.toString() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.1.kt b/compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt similarity index 50% rename from compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.1.kt rename to compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt index 704045bc9a6..fa760a238c1 100644 --- a/compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.1.kt +++ b/compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt @@ -1,6 +1,14 @@ +// FILE: 1.kt + +inline fun test(p: T) { + p.toString() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING fun box() : String { test {"123"} return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.2.kt b/compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.2.kt deleted file mode 100644 index eaa2e257641..00000000000 --- a/compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.2.kt +++ /dev/null @@ -1,3 +0,0 @@ -inline fun test(p: Any) { - p.toString() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.1.kt b/compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt similarity index 51% rename from compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.1.kt rename to compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt index 704045bc9a6..98751109cac 100644 --- a/compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.1.kt +++ b/compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt @@ -1,6 +1,14 @@ +// FILE: 1.kt + +inline fun test(p: Any) { + p.toString() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING fun box() : String { test {"123"} return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/noInline/noInline.2.kt b/compiler/testData/codegen/boxInline/noInline/noInline.2.kt deleted file mode 100644 index 9e38ef9e91e..00000000000 --- a/compiler/testData/codegen/boxInline/noInline/noInline.2.kt +++ /dev/null @@ -1,4 +0,0 @@ -inline fun calc(s: (Int) -> Int, noinline p: (Int) -> Int) : Int { - val z = p - return s(11) + z(11) + p(11) -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/noInline/noInline.1.kt b/compiler/testData/codegen/boxInline/noInline/noInline.kt similarity index 56% rename from compiler/testData/codegen/boxInline/noInline/noInline.1.kt rename to compiler/testData/codegen/boxInline/noInline/noInline.kt index 0d7483a67c5..09e11aa1940 100644 --- a/compiler/testData/codegen/boxInline/noInline/noInline.1.kt +++ b/compiler/testData/codegen/boxInline/noInline/noInline.kt @@ -1,3 +1,12 @@ +// FILE: 1.kt + +inline fun calc(s: (Int) -> Int, noinline p: (Int) -> Int) : Int { + val z = p + return s(11) + z(11) + p(11) +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING fun test1(): Int { return calc( { l: Int -> 2*l}, { l: Int -> 4*l}) @@ -8,4 +17,4 @@ fun box(): String { if (test1() != 110) return "test1: ${test1()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.2.kt b/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.2.kt deleted file mode 100644 index dd9a104eeb4..00000000000 --- a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun inlineFun(arg: T, f: (T) -> Unit) { - f(arg) -} diff --git a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.1.kt b/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt similarity index 91% rename from compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.1.kt rename to compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt index 1175c59fe81..541efe7cbf3 100644 --- a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.1.kt +++ b/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun inlineFun(arg: T, f: (T) -> Unit) { + f(arg) +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -58,4 +68,4 @@ fun box(): String { if (test3("start") != "start12") return "fail3: ${test3("start")}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.2.kt b/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.2.kt deleted file mode 100644 index dd9a104eeb4..00000000000 --- a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun inlineFun(arg: T, f: (T) -> Unit) { - f(arg) -} diff --git a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.1.kt b/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt similarity index 94% rename from compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.1.kt rename to compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt index 3974c3931d7..97254e08ff8 100644 --- a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.1.kt +++ b/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun inlineFun(arg: T, f: (T) -> Unit) { + f(arg) +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -70,4 +80,4 @@ fun box(): String { else "OK" } () -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/noInline/withoutInline.2.kt b/compiler/testData/codegen/boxInline/noInline/withoutInline.2.kt deleted file mode 100644 index 9eb116a0663..00000000000 --- a/compiler/testData/codegen/boxInline/noInline/withoutInline.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -class Inline { - - inline fun calc(s: (Int) -> Int, p: Int) : Int { - return s(p) - } -} - diff --git a/compiler/testData/codegen/boxInline/noInline/withoutInline.1.kt b/compiler/testData/codegen/boxInline/noInline/withoutInline.kt similarity index 63% rename from compiler/testData/codegen/boxInline/noInline/withoutInline.1.kt rename to compiler/testData/codegen/boxInline/noInline/withoutInline.kt index 49709d833bf..7508473e98b 100644 --- a/compiler/testData/codegen/boxInline/noInline/withoutInline.1.kt +++ b/compiler/testData/codegen/boxInline/noInline/withoutInline.kt @@ -1,3 +1,14 @@ +// FILE: 1.kt + +class Inline { + + inline fun calc(s: (Int) -> Int, p: Int) : Int { + return s(p) + } +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING fun test1(): Int { val inlineX = Inline() @@ -9,4 +20,4 @@ fun box(): String { if (test1() != 25) return "test1: ${test1()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.2.kt deleted file mode 100644 index 12d90f9709d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt similarity index 82% rename from compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt index 294eecda22a..8d3805a819a 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + import test.* fun test1(b: Boolean): String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.2.kt deleted file mode 100644 index 12d90f9709d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt similarity index 82% rename from compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt index 411ff7e8d21..34b99e73279 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + import test.* fun test1(b: Boolean): String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.2.kt deleted file mode 100644 index 12d90f9709d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt similarity index 82% rename from compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt index 411ff7e8d21..34b99e73279 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + import test.* fun test1(b: Boolean): String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.2.kt deleted file mode 100644 index 12d90f9709d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt similarity index 69% rename from compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt index 67fc6cde5d7..200ee54cf38 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + import test.* class Z {} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.2.kt deleted file mode 100644 index 12d90f9709d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt similarity index 62% rename from compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt index 4b77d0eecd2..d7e1c7edc17 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + import test.* fun test1(nonLocal: String): String { @@ -11,4 +21,4 @@ fun test1(nonLocal: String): String { fun box(): String { return test1("OK") -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.2.kt deleted file mode 100644 index 9c48b772152..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -inline fun foo(f: () -> Unit) { - try { - f() - } - finally { - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt similarity index 58% rename from compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt index 23474b1dd63..a4cffc30e40 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +inline fun foo(f: () -> Unit) { + try { + f() + } + finally { + } +} + +// FILE: 2.kt + import test.* fun box(): String { @@ -10,4 +24,4 @@ fun box(): String { } return "fail 2" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.2.kt deleted file mode 100644 index c776f4ee115..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package test - -inline fun foo(f: () -> Unit) { - try { - f() - } - finally { - 1 - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt similarity index 65% rename from compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt index fe525e1341d..d0774a21456 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt @@ -1,3 +1,18 @@ +// FILE: 1.kt + +package test + +inline fun foo(f: () -> Unit) { + try { + f() + } + finally { + 1 + } +} + +// FILE: 2.kt + import test.* var p = "fail" @@ -18,4 +33,4 @@ fun test() { fun box(): String { test() return p -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.2.kt deleted file mode 100644 index 12d90f9709d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt similarity index 94% rename from compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt index e0a56c02315..97ff7ccdaeb 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + import test.* import Kind.* diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.2.kt deleted file mode 100644 index 037b6ef9298..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -public fun noInlineCall(block: ()-> R) : R { - return block() -} - -public inline fun notUsed(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt similarity index 71% rename from compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt index f438dd7ac3b..cc2c560762a 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +public fun noInlineCall(block: ()-> R) : R { + return block() +} + +public inline fun notUsed(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.2.kt deleted file mode 100644 index e2a98ac6ed9..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -fun a(b: () -> String) : String { - return b() -} - -inline fun test(l: () -> String): String { - return l() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt similarity index 80% rename from compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt index b8cca4d36bd..af6f1e3d223 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +fun a(b: () -> String) : String { + return b() +} + +inline fun test(l: () -> String): String { + return l() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -42,4 +56,4 @@ fun box() : String { if (test4() != "OK") return "fail 4: ${test4()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.2.kt deleted file mode 100644 index 4a5a4a8a634..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun doCall(p: () -> R) { - p() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt similarity index 83% rename from compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt index 5ee99f4f183..275024ae34f 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun doCall(p: () -> R) { + p() +} + +// FILE: 2.kt + import test.* class A { @@ -27,4 +37,4 @@ fun box(): String { if (a.result != 2) return "fail 2: ${a.result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.2.kt deleted file mode 100644 index 111e1a6eed5..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.2.kt +++ /dev/null @@ -1,3 +0,0 @@ -inline fun foo(f: () -> Unit) { - f() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt similarity index 82% rename from compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt index 585137d477c..d653a70cc5a 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt @@ -1,3 +1,11 @@ +// FILE: 1.kt + +inline fun foo(f: () -> Unit) { + f() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING fun test(): String = fun (): String { foo { return "OK" } @@ -15,4 +23,4 @@ fun box(): String { if (test2() != "OK") return "fail 2: ${test2()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/simple.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/simple.2.kt deleted file mode 100644 index 12d90f9709d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/simple.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/simple.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt similarity index 90% rename from compiler/testData/codegen/boxInline/nonLocalReturns/simple.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt index 0d3c9e88492..efe029b8d69 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/simple.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + import test.* fun test1(local: Int, nonLocal: String, doNonLocal: Boolean): String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.2.kt deleted file mode 100644 index 12d90f9709d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt similarity index 93% rename from compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt index d970e21bcd2..4790c794384 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + import test.* fun test1(local: Int, nonLocal: String, doNonLocal: Boolean): String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.2.kt deleted file mode 100644 index 12d90f9709d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt similarity index 80% rename from compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt index c4267c88f86..8cebf05330e 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + import test.* class Holder(var value: Int) diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.2.kt deleted file mode 100644 index 12d90f9709d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt similarity index 96% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt index bbec4e8720a..0b168a75dbe 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + import test.* import Kind.* diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.2.kt deleted file mode 100644 index 57acd9c0a8f..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.2.kt +++ /dev/null @@ -1,13 +0,0 @@ -package test - -class Holder { - var value: String = "" -} - -inline fun doCall(block: ()-> R, h: Holder) : R { - try { - return block() - } finally { - h.value += ", in doCall finally" - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt similarity index 93% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt index 7dbe5a93fa1..304d0c1b23b 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt @@ -1,3 +1,21 @@ +// FILE: 1.kt + +package test + +class Holder { + var value: String = "" +} + +inline fun doCall(block: ()-> R, h: Holder) : R { + try { + return block() + } finally { + h.value += ", in doCall finally" + } +} + +// FILE: 2.kt + import test.* import Kind.* diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.2.kt deleted file mode 100644 index 5e3f9b581fc..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.2.kt +++ /dev/null @@ -1,33 +0,0 @@ -package test - -public class Holder(var value: String = "") { - - operator fun plusAssign(s: String?) { - if (value.length != 0) { - value += " -> " - } - value += s - } - - override fun toString(): String { - return value - } - -} - -public inline fun doCall(h: Holder, block: ()-> R) : R { - try { - return block() - } finally { - h += "inline fun finally" - } -} - -public inline fun doCallWithException(h: Holder, block: ()-> R) : R { - try { - return block() - } finally { - h += "inline fun finally" - throw RuntimeException("fail"); - } -} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt similarity index 75% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt index d69176542ba..b5929b8d8f7 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt @@ -1,3 +1,41 @@ +// FILE: 1.kt + +package test + +public class Holder(var value: String = "") { + + operator fun plusAssign(s: String?) { + if (value.length != 0) { + value += " -> " + } + value += s + } + + override fun toString(): String { + return value + } + +} + +public inline fun doCall(h: Holder, block: ()-> R) : R { + try { + return block() + } finally { + h += "inline fun finally" + } +} + +public inline fun doCallWithException(h: Holder, block: ()-> R) : R { + try { + return block() + } finally { + h += "inline fun finally" + throw RuntimeException("fail"); + } +} + +// FILE: 2.kt + import test.* import kotlin.test.assertEquals import kotlin.test.assertTrue diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.2.kt deleted file mode 100644 index e242a722665..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.2.kt +++ /dev/null @@ -1,33 +0,0 @@ -package test - -public class Holder(var value: String = "") { - - operator fun plusAssign(s: String?) { - if (value.length != 0) { - value += " -> " - } - value += s - } - - override fun toString(): String { - return value - } - -} - -public inline fun doCall(h: Holder, block: ()-> R) { - try { - block() - } finally { - h += "inline fun finally" - } -} - -public inline fun doCallWithException(h: Holder, block: ()-> R) { - try { - block() - } finally { - h += "inline fun finally" - throw RuntimeException("fail"); - } -} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt similarity index 75% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt index 282cb8d341e..9c89df9721d 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt @@ -1,3 +1,41 @@ +// FILE: 1.kt + +package test + +public class Holder(var value: String = "") { + + operator fun plusAssign(s: String?) { + if (value.length != 0) { + value += " -> " + } + value += s + } + + override fun toString(): String { + return value + } + +} + +public inline fun doCall(h: Holder, block: ()-> R) { + try { + block() + } finally { + h += "inline fun finally" + } +} + +public inline fun doCallWithException(h: Holder, block: ()-> R) { + try { + block() + } finally { + h += "inline fun finally" + throw RuntimeException("fail"); + } +} + +// FILE: 2.kt + import test.* import kotlin.test.assertEquals import kotlin.test.assertTrue diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.2.kt deleted file mode 100644 index a8e1b0fd426..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -public inline fun doCall(block: ()-> Unit, finallyBlock1: ()-> Unit) { - try { - block() - } finally { - finallyBlock1() - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt similarity index 90% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt index a8bcadcffba..32d8b0ebec0 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> Unit, finallyBlock1: ()-> Unit) { + try { + block() + } finally { + finallyBlock1() + } +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.2.kt deleted file mode 100644 index 12d90f9709d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R) : R { - return block() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt similarity index 82% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt index 951e9225d4f..6d8641272e2 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R) : R { + return block() +} + +// FILE: 2.kt + import test.* fun test1(): String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.2.kt deleted file mode 100644 index 6ddaaa09276..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.2.kt +++ /dev/null @@ -1,40 +0,0 @@ -package test - -class Holder { - var value: String = "" -} - -inline fun doCall_1(block: ()-> Unit, h: Holder) { - try { - doCall(block) { - h.value += ", OF_FINALLY1" - return - } - } finally { - h.value += ", DO_CALL_1_FINALLY" - } -} - -inline fun doCall_2(block: ()-> Unit, h: Holder) { - try { - doCall(block) { - try { - h.value += ", OF_FINALLY1" - return - } - finally { - h.value += ", OF_FINALLY1_FINALLY" - } - } - } finally { - h.value += ", DO_CALL_1_FINALLY" - } -} - -inline fun doCall(block: ()-> Unit, finallyBlock1: ()-> Unit) { - try { - block() - } finally { - finallyBlock1() - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt similarity index 65% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt index bcfcc3be977..8ea6a0004ac 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt @@ -1,3 +1,48 @@ +// FILE: 1.kt + +package test + +class Holder { + var value: String = "" +} + +inline fun doCall_1(block: ()-> Unit, h: Holder) { + try { + doCall(block) { + h.value += ", OF_FINALLY1" + return + } + } finally { + h.value += ", DO_CALL_1_FINALLY" + } +} + +inline fun doCall_2(block: ()-> Unit, h: Holder) { + try { + doCall(block) { + try { + h.value += ", OF_FINALLY1" + return + } + finally { + h.value += ", OF_FINALLY1_FINALLY" + } + } + } finally { + h.value += ", DO_CALL_1_FINALLY" + } +} + +inline fun doCall(block: ()-> Unit, finallyBlock1: ()-> Unit) { + try { + block() + } finally { + finallyBlock1() + } +} + +// FILE: 2.kt + import test.* fun test1(h: Holder, doReturn: Int): String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.2.kt deleted file mode 100644 index 68bc35262cc..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.2.kt +++ /dev/null @@ -1,38 +0,0 @@ -package test - -class Holder { - var value: String = "" -} - -inline fun doCall_1(block: ()-> Unit, h: Holder) { - try { - doCall(block) { - h.value += ", OF_FINALLY1" - } - } finally { - h.value += ", DO_CALL_1_FINALLY" - } -} - -inline fun doCall_2(block: ()-> Unit, h: Holder) { - try { - doCall(block) { - try { - h.value += ", OF_FINALLY1" - } - finally { - h.value += ", OF_FINALLY1_FINALLY" - } - } - } finally { - h.value += ", DO_CALL_1_FINALLY" - } -} - -inline fun doCall(block: ()-> Unit, finallyBlock1: ()-> Unit) { - try { - block() - } finally { - finallyBlock1() - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt similarity index 66% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt index 870851ced5f..8b4b28414fe 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt @@ -1,3 +1,46 @@ +// FILE: 1.kt + +package test + +class Holder { + var value: String = "" +} + +inline fun doCall_1(block: ()-> Unit, h: Holder) { + try { + doCall(block) { + h.value += ", OF_FINALLY1" + } + } finally { + h.value += ", DO_CALL_1_FINALLY" + } +} + +inline fun doCall_2(block: ()-> Unit, h: Holder) { + try { + doCall(block) { + try { + h.value += ", OF_FINALLY1" + } + finally { + h.value += ", OF_FINALLY1_FINALLY" + } + } + } finally { + h.value += ", DO_CALL_1_FINALLY" + } +} + +inline fun doCall(block: ()-> Unit, finallyBlock1: ()-> Unit) { + try { + block() + } finally { + finallyBlock1() + } +} + +// FILE: 2.kt + import test.* fun test1(h: Holder, doReturn: Int): String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.1.kt deleted file mode 100644 index a525517486f..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.1.kt +++ /dev/null @@ -1,30 +0,0 @@ -import test.* - - -fun test0(h: Holder, throwException: Boolean): Int { - val localResult = doCall2_2 ( - { - h.value += "OK_NONLOCAL" - if (throwException) { - throw java.lang.RuntimeException() - } - return 1 - }, - "FAIL", - h - ) - - return -1; -} - -fun box(): String { - var h = Holder() - val test0 = test0(h, true) - if (test0 != -1 || h.value != "OK_NONLOCAL, OK_EXCEPTION, OK_FINALLY") return "test0: ${test0}, holder: ${h.value}" - - h = Holder() - val test1 = test0(h, false) - if (test1 != 1 || h.value != "OK_NONLOCAL, OK_FINALLY") return "test1: ${test1}, holder: ${h.value}" - - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.2.kt deleted file mode 100644 index 17de22a90b1..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.2.kt +++ /dev/null @@ -1,32 +0,0 @@ -package test - -public class Holder { - public var value: String = "" -} - -public inline fun doCall2_2(block: () -> R, res: R, h: Holder): R { - return doCall2_1(block, { - h.value += ", OK_EXCEPTION" - "OK_EXCEPTION" - }, res, h) -} - -public inline fun doCall2_1(block: () -> R, exception: (e: Exception) -> Unit, res: R, h: Holder): R { - return doCall2(block, exception, { - h.value += ", OK_FINALLY" - "OK_FINALLY" - }, res) -} - -public inline fun doCall2(block: () -> R, exception: (e: Exception) -> Unit, finallyBlock: () -> Unit, res: R): R { - try { - return block() - } - catch (e: Exception) { - exception(e) - } - finally { - finallyBlock() - } - return res -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt new file mode 100644 index 00000000000..da5a3862593 --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt @@ -0,0 +1,67 @@ +// FILE: 1.kt + +package test + +public class Holder { + public var value: String = "" +} + +public inline fun doCall2_2(block: () -> R, res: R, h: Holder): R { + return doCall2_1(block, { + h.value += ", OK_EXCEPTION" + "OK_EXCEPTION" + }, res, h) +} + +public inline fun doCall2_1(block: () -> R, exception: (e: Exception) -> Unit, res: R, h: Holder): R { + return doCall2(block, exception, { + h.value += ", OK_FINALLY" + "OK_FINALLY" + }, res) +} + +public inline fun doCall2(block: () -> R, exception: (e: Exception) -> Unit, finallyBlock: () -> Unit, res: R): R { + try { + return block() + } + catch (e: Exception) { + exception(e) + } + finally { + finallyBlock() + } + return res +} + +// FILE: 2.kt + +import test.* + + +fun test0(h: Holder, throwException: Boolean): Int { + val localResult = doCall2_2 ( + { + h.value += "OK_NONLOCAL" + if (throwException) { + throw java.lang.RuntimeException() + } + return 1 + }, + "FAIL", + h + ) + + return -1; +} + +fun box(): String { + var h = Holder() + val test0 = test0(h, true) + if (test0 != -1 || h.value != "OK_NONLOCAL, OK_EXCEPTION, OK_FINALLY") return "test0: ${test0}, holder: ${h.value}" + + h = Holder() + val test1 = test0(h, false) + if (test1 != 1 || h.value != "OK_NONLOCAL, OK_FINALLY") return "test1: ${test1}, holder: ${h.value}" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.1.kt deleted file mode 100644 index 6d5ad3e8b06..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.1.kt +++ /dev/null @@ -1,30 +0,0 @@ -import test.* - - -fun test0(h: Holder, throwException: Boolean): Int { - val localResult = doCall2_2 ( - { - h.value += "OK_NONLOCAL" - if (throwException) { - throw java.lang.RuntimeException() - } - return 1 - }, - "FAIL", - h - ) - - return -1; -} - -fun box(): String { - var h = Holder() - val test0 = test0(h, true) - if (test0 != -1 || h.value != "OK_NONLOCAL, OK_EXCEPTION, OK_FINALLY, DO_CALL_2_FINALLY") return "test0: ${test0}, holder: ${h.value}" - - h = Holder() - val test1 = test0(h, false) - if (test1 != 1 || h.value != "OK_NONLOCAL, OK_FINALLY, DO_CALL_2_FINALLY") return "test1: ${test1}, holder: ${h.value}" - - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt similarity index 51% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.2.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt index bb41944b577..b5a951b4d7e 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.2.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public class Holder { @@ -33,4 +35,37 @@ public inline fun doCall2(block: () -> R, exception: (e: Exception) -> Unit, h.value += ", DO_CALL_2_FINALLY" } return res -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + + +fun test0(h: Holder, throwException: Boolean): Int { + val localResult = doCall2_2 ( + { + h.value += "OK_NONLOCAL" + if (throwException) { + throw java.lang.RuntimeException() + } + return 1 + }, + "FAIL", + h + ) + + return -1; +} + +fun box(): String { + var h = Holder() + val test0 = test0(h, true) + if (test0 != -1 || h.value != "OK_NONLOCAL, OK_EXCEPTION, OK_FINALLY, DO_CALL_2_FINALLY") return "test0: ${test0}, holder: ${h.value}" + + h = Holder() + val test1 = test0(h, false) + if (test1 != 1 || h.value != "OK_NONLOCAL, OK_FINALLY, DO_CALL_2_FINALLY") return "test1: ${test1}, holder: ${h.value}" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.1.kt deleted file mode 100644 index af2903eecc4..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.1.kt +++ /dev/null @@ -1,30 +0,0 @@ -import test.* - - -fun test0(h: Holder, throwException: Boolean): Int { - val localResult = doCall2_2 ( - { - h.value += "OK_NONLOCAL" - if (throwException) { - throw java.lang.RuntimeException() - } - return 1 - }, - "FAIL", - h - ) - - return -1; -} - -fun box(): String { - var h = Holder() - val test0 = test0(h, true) - if (test0 != -1 || h.value != "OK_NONLOCAL, OK_EXCEPTION, OK_FINALLY, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") return "test0: ${test0}, holder: ${h.value}" - - h = Holder() - val test1 = test0(h, false) - if (test1 != 1 || h.value != "OK_NONLOCAL, OK_FINALLY, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") return "test1: ${test1}, holder: ${h.value}" - - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt similarity index 54% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.2.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt index 0bb63b2c465..a096b325ae6 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.2.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public class Holder { @@ -41,4 +43,37 @@ public inline fun doCall2(block: () -> R, exception: (e: Exception) -> Unit, h.value += ", DO_CALL_2_FINALLY" } return res -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + + +fun test0(h: Holder, throwException: Boolean): Int { + val localResult = doCall2_2 ( + { + h.value += "OK_NONLOCAL" + if (throwException) { + throw java.lang.RuntimeException() + } + return 1 + }, + "FAIL", + h + ) + + return -1; +} + +fun box(): String { + var h = Holder() + val test0 = test0(h, true) + if (test0 != -1 || h.value != "OK_NONLOCAL, OK_EXCEPTION, OK_FINALLY, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") return "test0: ${test0}, holder: ${h.value}" + + h = Holder() + val test1 = test0(h, false) + if (test1 != 1 || h.value != "OK_NONLOCAL, OK_FINALLY, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") return "test1: ${test1}, holder: ${h.value}" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.1.kt deleted file mode 100644 index 1f5af18cd38..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.1.kt +++ /dev/null @@ -1,34 +0,0 @@ -import test.* - - -fun test0(h: Holder, throwException: Boolean): Int { - val localResult = doCall2_2 ( - { - h.value += "OK_NONLOCAL" - if (throwException) { - throw java.lang.RuntimeException() - } - return 1 - }, - "FAIL", - h - ) - - return -1; -} - -fun box(): String { - var h = Holder() - val test0 = test0(h, true) - if (test0 != -1 || h.value != "OK_NONLOCAL, OK_EXCEPTION, OK_FINALLY, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") - return "test0: ${test0}, holder: ${h.value}" - - h = Holder() - val test1 = test0(h, false) - if (test1 != 1 || h.value != "OK_NONLOCAL, OK_FINALLY, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") - return "test1: ${test1}, holder: ${h.value}" - - return "OK" -} - - diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt similarity index 54% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.2.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt index 548ea14c1fb..06fd93766a4 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.2.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public class Holder { @@ -41,4 +43,39 @@ public inline fun doCall2(block: () -> R, exception: (e: Exception) -> Unit, h.value += ", DO_CALL_2_FINALLY" } return res -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + + +fun test0(h: Holder, throwException: Boolean): Int { + val localResult = doCall2_2 ( + { + h.value += "OK_NONLOCAL" + if (throwException) { + throw java.lang.RuntimeException() + } + return 1 + }, + "FAIL", + h + ) + + return -1; +} + +fun box(): String { + var h = Holder() + val test0 = test0(h, true) + if (test0 != -1 || h.value != "OK_NONLOCAL, OK_EXCEPTION, OK_FINALLY, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") + return "test0: ${test0}, holder: ${h.value}" + + h = Holder() + val test1 = test0(h, false) + if (test1 != 1 || h.value != "OK_NONLOCAL, OK_FINALLY, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") + return "test1: ${test1}, holder: ${h.value}" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.1.kt deleted file mode 100644 index b2dbc91e39f..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.1.kt +++ /dev/null @@ -1,34 +0,0 @@ -import test.* - - -fun test0(h: Holder, throwException: Boolean): Int { - val localResult = doCall2_2 ( - { - h.value += "OK_NONLOCAL" - if (throwException) { - throw java.lang.RuntimeException() - } - return 1 - }, - "FAIL", - h - ) - - return -1; -} - - -fun box(): String { - var h = Holder() - val test0 = test0(h, true) - - if (test0 != -1 || h.value != "OK_NONLOCAL, OK_EXCEPTION, OK_FINALLY, OK_FINALLY_NESTED, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") return "test0: ${test0}, holder: ${h.value}" - - h = Holder() - val test1 = test0(h, false) - if (test1 != 1 || h.value != "OK_NONLOCAL, OK_FINALLY, OK_FINALLY_NESTED, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") return "test1: ${test1}, holder: ${h.value}" - - return "OK" -} - - diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt similarity index 55% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.2.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt index 1155a4cc47c..1cc102a0016 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.2.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public class Holder { @@ -45,4 +47,39 @@ public inline fun doCall2(block: () -> R, exception: (e: Exception) -> Unit, h.value += ", DO_CALL_2_FINALLY" } return res -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + + +fun test0(h: Holder, throwException: Boolean): Int { + val localResult = doCall2_2 ( + { + h.value += "OK_NONLOCAL" + if (throwException) { + throw java.lang.RuntimeException() + } + return 1 + }, + "FAIL", + h + ) + + return -1; +} + + +fun box(): String { + var h = Holder() + val test0 = test0(h, true) + + if (test0 != -1 || h.value != "OK_NONLOCAL, OK_EXCEPTION, OK_FINALLY, OK_FINALLY_NESTED, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") return "test0: ${test0}, holder: ${h.value}" + + h = Holder() + val test1 = test0(h, false) + if (test1 != 1 || h.value != "OK_NONLOCAL, OK_FINALLY, OK_FINALLY_NESTED, DO_CALL_2_FINALLY, DO_CALL_2_1_FINALLY, DO_CALL_2_2_FINALLY") return "test1: ${test1}, holder: ${h.value}" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.2.kt deleted file mode 100644 index 57acd9c0a8f..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.2.kt +++ /dev/null @@ -1,13 +0,0 @@ -package test - -class Holder { - var value: String = "" -} - -inline fun doCall(block: ()-> R, h: Holder) : R { - try { - return block() - } finally { - h.value += ", in doCall finally" - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt similarity index 89% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt index dddbcde969c..c6ad7820683 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt @@ -1,3 +1,21 @@ +// FILE: 1.kt + +package test + +class Holder { + var value: String = "" +} + +inline fun doCall(block: ()-> R, h: Holder) : R { + try { + return block() + } finally { + h.value += ", in doCall finally" + } +} + +// FILE: 2.kt + import test.* val FINALLY_CHAIN = "in local finally, in doCall finally, in external finally, in doCall finally, in global finally" diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.2.kt deleted file mode 100644 index f3aeaae15d3..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R, finallyLambda: ()-> Unit) : R { - try { - return block() - } finally { - finallyLambda() - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt similarity index 94% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt index 75c8eee0122..583f141128c 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R, finallyLambda: ()-> Unit) : R { + try { + return block() + } finally { + finallyLambda() + } +} + +// FILE: 2.kt + import test.* import Kind.* diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.2.kt deleted file mode 100644 index 6c59dc1a204..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.2.kt +++ /dev/null @@ -1,23 +0,0 @@ -package test - -public inline fun doCall(block: ()-> Int, exception: (e: Exception)-> Unit, finallyBlock: ()-> Int, res: Int = -111) : Int { - try { - return block() - } catch (e: Exception) { - exception(e) - } finally { - finallyBlock() - } - return res -} - -public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R, res: R) : R { - try { - return block() - } catch (e: Exception) { - exception(e) - } finally { - finallyBlock() - } - return res -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt similarity index 84% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt index 59892ae123e..a5c435e10ed 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt @@ -1,3 +1,31 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> Int, exception: (e: Exception)-> Unit, finallyBlock: ()-> Int, res: Int = -111) : Int { + try { + return block() + } catch (e: Exception) { + exception(e) + } finally { + finallyBlock() + } + return res +} + +public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R, res: R) : R { + try { + return block() + } catch (e: Exception) { + exception(e) + } finally { + finallyBlock() + } + return res +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.2.kt deleted file mode 100644 index bdff0c06fbc..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.2.kt +++ /dev/null @@ -1,39 +0,0 @@ -package test - -public class Holder { - public var value: String = "" -} - -public inline fun doCall(block: ()-> Int, exception: (e: Exception)-> Unit, finallyBlock: ()-> Int, h : Holder, res: Int = -111) : Int { - try { - try { - return block() - } - catch (e: Exception) { - exception(e) - } - finally { - finallyBlock() - } - } finally { - h.value += ", INLINE_CALL_FINALLY" - } - return res -} - -public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R, res: R, h : Holder) : R { - try { - try { - return block() - } - catch (e: Exception) { - exception(e) - } - finally { - finallyBlock() - } - } finally { - h.value += ", INLINE_CALL_FINALLY" - } - return res -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt similarity index 78% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt index 9dfa097b028..51a90e3d0ed 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt @@ -1,3 +1,47 @@ +// FILE: 1.kt + +package test + +public class Holder { + public var value: String = "" +} + +public inline fun doCall(block: ()-> Int, exception: (e: Exception)-> Unit, finallyBlock: ()-> Int, h : Holder, res: Int = -111) : Int { + try { + try { + return block() + } + catch (e: Exception) { + exception(e) + } + finally { + finallyBlock() + } + } finally { + h.value += ", INLINE_CALL_FINALLY" + } + return res +} + +public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R, res: R, h : Holder) : R { + try { + try { + return block() + } + catch (e: Exception) { + exception(e) + } + finally { + finallyBlock() + } + } finally { + h.value += ", INLINE_CALL_FINALLY" + } + return res +} + +// FILE: 2.kt + import test.* diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.2.kt deleted file mode 100644 index 322e42e5e2c..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.2.kt +++ /dev/null @@ -1,23 +0,0 @@ -package test - -public inline fun doCall(block: ()-> Long, exception: (e: Exception)-> Unit, finallyBlock: ()-> Long, res: Long = -1111.toLong()) : Long { - try { - block() - } catch (e: Exception) { - exception(e) - } finally { - finallyBlock() - } - return res -} - -public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R, res: R) : R { - try { - return block() - } catch (e: Exception) { - exception(e) - } finally { - finallyBlock() - } - return res -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt similarity index 85% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt index 6bd511905f8..7fbbf458fae 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt @@ -1,3 +1,31 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> Long, exception: (e: Exception)-> Unit, finallyBlock: ()-> Long, res: Long = -1111.toLong()) : Long { + try { + block() + } catch (e: Exception) { + exception(e) + } finally { + finallyBlock() + } + return res +} + +public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R, res: R) : R { + try { + return block() + } catch (e: Exception) { + exception(e) + } finally { + finallyBlock() + } + return res +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.2.kt deleted file mode 100644 index 8888bb5e342..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.2.kt +++ /dev/null @@ -1,14 +0,0 @@ -package test - -public inline fun doCall(block: ()-> Unit, finallyBlock1: ()-> Unit, finallyBlock2: ()-> Unit) { - try { - try { - block() - } - finally { - finallyBlock1() - } - } finally { - finallyBlock2() - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt similarity index 89% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt index 2d5cc745ec0..d6beb7eaf5c 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt @@ -1,3 +1,22 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> Unit, finallyBlock1: ()-> Unit, finallyBlock2: ()-> Unit) { + try { + try { + block() + } + finally { + finallyBlock1() + } + } finally { + finallyBlock2() + } +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.2.kt deleted file mode 100644 index cd15844d50f..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R, finallyBlock: ()-> R) : R { - try { - block() - } finally { - return finallyBlock() - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt similarity index 90% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt index 0f7ad104084..11e1e00e537 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R, finallyBlock: ()-> R) : R { + try { + block() + } finally { + return finallyBlock() + } +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.2.kt deleted file mode 100644 index e65ab6b6283..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R, finallyBlock: ()-> Unit) : R { - try { - return block() - } finally { - finallyBlock() - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt similarity index 85% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt index 7c79a671715..9c81bdedc71 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R, finallyBlock: ()-> Unit) : R { + try { + return block() + } finally { + finallyBlock() + } +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.2.kt deleted file mode 100644 index 9d8cbea9edc..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R, finallyBlock: ()-> R) : R { - try { - return block() - } finally { - return finallyBlock() - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt similarity index 90% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt index 507327d977c..5e943261554 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R, finallyBlock: ()-> R) : R { + try { + return block() + } finally { + return finallyBlock() + } +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.2.kt deleted file mode 100644 index c1f9c28949a..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package test - -public inline fun doCall(block: ()-> Unit, block2: ()-> Unit, finallyBlock2: ()-> Unit) { - try { - block() - block2() - } finally { - finallyBlock2() - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt similarity index 89% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt index dec671397b8..4dd77538331 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt @@ -1,3 +1,18 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> Unit, block2: ()-> Unit, finallyBlock2: ()-> Unit) { + try { + block() + block2() + } finally { + finallyBlock2() + } +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.2.kt deleted file mode 100644 index 79866ead52b..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.2.kt +++ /dev/null @@ -1,19 +0,0 @@ -package test - -class Holder { - var value: String = "" -} - -inline fun doCall(block: ()-> Unit, block2: ()-> Unit, finallyBlock2: ()-> Unit, res: Holder) { - try { - try { - block() - block2() - } - finally { - finallyBlock2() - } - } finally { - res.value += ", DO_CALL_EXT_FINALLY" - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt similarity index 83% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt index ab27272abb9..49acaa70b09 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt @@ -1,3 +1,27 @@ +// FILE: 1.kt + +package test + +class Holder { + var value: String = "" +} + +inline fun doCall(block: ()-> Unit, block2: ()-> Unit, finallyBlock2: ()-> Unit, res: Holder) { + try { + try { + block() + block2() + } + finally { + finallyBlock2() + } + } finally { + res.value += ", DO_CALL_EXT_FINALLY" + } +} + +// FILE: 2.kt + import test.* fun test1(h: Holder, doReturn: Int): String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.2.kt deleted file mode 100644 index 849b9d737a3..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R, finallyBlock: ()-> Unit) { - try { - block() - } finally { - finallyBlock() - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt similarity index 85% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt index 16101fd4288..924358c4462 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R, finallyBlock: ()-> Unit) { + try { + block() + } finally { + finallyBlock() + } +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.2.kt deleted file mode 100644 index e65ab6b6283..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R, finallyBlock: ()-> Unit) : R { - try { - return block() - } finally { - finallyBlock() - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt similarity index 85% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt index d3d4ce6ec29..3cb24c35d54 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R, finallyBlock: ()-> Unit) : R { + try { + return block() + } finally { + finallyBlock() + } +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.1.kt deleted file mode 100644 index ba10a41daf0..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.1.kt +++ /dev/null @@ -1,49 +0,0 @@ -import test.* - -fun test1(): Int { - var s = 0 - doCallAlwaysBreak { - s += it*it - s - } - return s; -} - -fun test11(): Int { - return doCallAlwaysBreak { - return -100 - } -} - -fun test2(): Int { - return doCallAlwaysBreak2 { - return -100 - } -} - -fun test22(): Int { - var s = 0 - doCallAlwaysBreak { - s += it*it - s - } - return s; -} - - - -fun box(): String { - val test1 = test1() - if (test1 != 1) return "test1: ${test1}" - - val test11 = test11() - if (test11 != 0) return "test11: ${test11}" - - val test2 = test2() - if (test2 != 0) return "test2: ${test2}" - - val test22 = test22() - if (test22 != 1) return "test22: ${test22}" - - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt similarity index 50% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.2.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt index 31037a701ec..71b18f6ca38 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.2.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public inline fun doCallAlwaysBreak(block: (i: Int)-> Int) : Int { @@ -38,4 +40,56 @@ public inline fun doCallAlwaysBreak2(block: (i: Int)-> Int) : Int { // } // } // return res -//} \ No newline at end of file +//} + +// FILE: 2.kt + +import test.* + +fun test1(): Int { + var s = 0 + doCallAlwaysBreak { + s += it*it + s + } + return s; +} + +fun test11(): Int { + return doCallAlwaysBreak { + return -100 + } +} + +fun test2(): Int { + return doCallAlwaysBreak2 { + return -100 + } +} + +fun test22(): Int { + var s = 0 + doCallAlwaysBreak { + s += it*it + s + } + return s; +} + + + +fun box(): String { + val test1 = test1() + if (test1 != 1) return "test1: ${test1}" + + val test11 = test11() + if (test11 != 0) return "test11: ${test11}" + + val test2 = test2() + if (test2 != 0) return "test2: ${test2}" + + val test22 = test22() + if (test22 != 1) return "test22: ${test22}" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.1.kt deleted file mode 100644 index e95ac2e88d5..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.1.kt +++ /dev/null @@ -1,48 +0,0 @@ -import test.* - -fun test1(): Int { - var s = 0 - doCallAlwaysBreak { - s += it*it - s - } - return s; -} - -fun test11(): Int { - return doCallAlwaysBreak { - return -100 - } -} - -fun test2(): Int { - return doCallAlwaysBreak2 { - return -100 - } -} - -fun test22(): Int { - var s = 0 - doCallAlwaysBreak { - s += it*it - s - } - return s; -} - - -fun box(): String { - val test1 = test1() - if (test1 != 385) return "test1: ${test1}" - - val test11 = test11() - if (test11 != 0) return "test11: ${test11}" - - val test2 = test2() - if (test2 != 0) return "test2: ${test2}" - - val test22 = test22() - if (test22 != 385) return "test22: ${test22}" - - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt similarity index 50% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.2.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt index ed977ef927d..6a7bd5071f3 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.2.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public inline fun doCallAlwaysBreak(block: (i: Int)-> Int) : Int { @@ -38,4 +40,55 @@ public inline fun doCallAlwaysBreak2(block: (i: Int)-> Int) : Int { // } // } // return res -//} \ No newline at end of file +//} + +// FILE: 2.kt + +import test.* + +fun test1(): Int { + var s = 0 + doCallAlwaysBreak { + s += it*it + s + } + return s; +} + +fun test11(): Int { + return doCallAlwaysBreak { + return -100 + } +} + +fun test2(): Int { + return doCallAlwaysBreak2 { + return -100 + } +} + +fun test22(): Int { + var s = 0 + doCallAlwaysBreak { + s += it*it + s + } + return s; +} + + +fun box(): String { + val test1 = test1() + if (test1 != 385) return "test1: ${test1}" + + val test11 = test11() + if (test11 != 0) return "test11: ${test11}" + + val test2 = test2() + if (test2 != 0) return "test2: ${test2}" + + val test22 = test22() + if (test22 != 385) return "test22: ${test22}" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.2.kt deleted file mode 100644 index 436c9974338..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.2.kt +++ /dev/null @@ -1,15 +0,0 @@ -package test - -public interface MCloseable { - public open fun close() -} - -public inline fun T.muse(block: (T) -> R): R { - try { - return block(this) - } finally { - this.close() - } -} - - diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt similarity index 84% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt index 5b3cd3d7097..05154cce86d 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt @@ -1,3 +1,21 @@ +// FILE: 1.kt + +package test + +public interface MCloseable { + public open fun close() +} + +public inline fun T.muse(block: (T) -> R): R { + try { + return block(this) + } finally { + this.close() + } +} + +// FILE: 2.kt + import test.* import kotlin.test.assertEquals import kotlin.test.assertTrue diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.2.kt deleted file mode 100644 index afa491375fa..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.2.kt +++ /dev/null @@ -1,15 +0,0 @@ -package test - -public inline fun doCall(block: (i: Int)-> Int, fblock: (i: Int)-> Unit) : Int { - var res = 0; - for (i in 1..10) { - try { - res = block(i) - } finally { - for (i in 1..10) { - fblock(i) - } - } - } - return res -} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt similarity index 66% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt index 957fe245ce6..1aba6d9892e 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt @@ -1,3 +1,23 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: (i: Int)-> Int, fblock: (i: Int)-> Unit) : Int { + var res = 0; + for (i in 1..10) { + try { + res = block(i) + } finally { + for (i in 1..10) { + fblock(i) + } + } + } + return res +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.2.kt deleted file mode 100644 index b7601296aed..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.2.kt +++ /dev/null @@ -1,29 +0,0 @@ -package test - -public class Exception1(message: String) : java.lang.RuntimeException(message) - -public class Exception2(message: String) : java.lang.RuntimeException(message) - -public inline fun doCall(block: ()-> String, exception: (e: Exception)-> Unit, exception2: (e: Exception)-> Unit, finallyBlock: ()-> String, res: String = "Fail") : String { - try { - block() - } catch (e: Exception1) { - exception(e) - } catch (e: Exception2) { - exception2(e) - } finally { - finallyBlock() - } - return res -} - -public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R) : R { - try { - return block() - } catch (e: Exception) { - exception(e) - } finally { - finallyBlock() - } - throw java.lang.RuntimeException("fail") -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt similarity index 80% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt index 15892ff1434..ad6cdb1c095 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt @@ -1,3 +1,37 @@ +// FILE: 1.kt + +package test + +public class Exception1(message: String) : java.lang.RuntimeException(message) + +public class Exception2(message: String) : java.lang.RuntimeException(message) + +public inline fun doCall(block: ()-> String, exception: (e: Exception)-> Unit, exception2: (e: Exception)-> Unit, finallyBlock: ()-> String, res: String = "Fail") : String { + try { + block() + } catch (e: Exception1) { + exception(e) + } catch (e: Exception2) { + exception2(e) + } finally { + finallyBlock() + } + return res +} + +public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R) : R { + try { + return block() + } catch (e: Exception) { + exception(e) + } finally { + finallyBlock() + } + throw java.lang.RuntimeException("fail") +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.2.kt deleted file mode 100644 index d5d44c569ab..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.2.kt +++ /dev/null @@ -1,32 +0,0 @@ -package test - -public class Exception1(message: String) : java.lang.RuntimeException(message) - -public class Exception2(message: String) : java.lang.RuntimeException(message) - -public inline fun doCall(block: ()-> String, exception1: (e: Exception)-> Unit, exception2: (e: Exception)-> Unit, finallyBlock: ()-> String, - exception3: (e: Exception)-> Unit, exception4: (e: Exception)-> Unit, finallyBlock2: ()-> String, res: String = "Fail") : String { - try { - try { - block() - } - catch (e: Exception1) { - exception1(e) - } - catch (e: Exception2) { - exception2(e) - } - finally { - finallyBlock() - } - } catch (e: Exception1) { - exception3(e) - } - catch (e: Exception2) { - exception4(e) - } - finally { - finallyBlock2() - } - return res -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt similarity index 82% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt index 2f87484f4ae..68d05731888 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt @@ -1,3 +1,40 @@ +// FILE: 1.kt + +package test + +public class Exception1(message: String) : java.lang.RuntimeException(message) + +public class Exception2(message: String) : java.lang.RuntimeException(message) + +public inline fun doCall(block: ()-> String, exception1: (e: Exception)-> Unit, exception2: (e: Exception)-> Unit, finallyBlock: ()-> String, + exception3: (e: Exception)-> Unit, exception4: (e: Exception)-> Unit, finallyBlock2: ()-> String, res: String = "Fail") : String { + try { + try { + block() + } + catch (e: Exception1) { + exception1(e) + } + catch (e: Exception2) { + exception2(e) + } + finally { + finallyBlock() + } + } catch (e: Exception1) { + exception3(e) + } + catch (e: Exception2) { + exception4(e) + } + finally { + finallyBlock2() + } + return res +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.2.kt deleted file mode 100644 index fe1ad74bedc..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.2.kt +++ /dev/null @@ -1,14 +0,0 @@ -package test - -public class Exception1(message: String) : java.lang.RuntimeException(message) - -public inline fun doCall(block: ()-> String, exception: (e: Exception)-> Unit, finallyBlock: ()-> String, res: String = "Fail") : String { - try { - block() - } catch (e: Exception1) { - exception(e) - } finally { - finallyBlock() - } - return res -} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt similarity index 70% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt index 6e1ae4cda9e..c6648516fa1 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt @@ -1,3 +1,22 @@ +// FILE: 1.kt + +package test + +public class Exception1(message: String) : java.lang.RuntimeException(message) + +public inline fun doCall(block: ()-> String, exception: (e: Exception)-> Unit, finallyBlock: ()-> String, res: String = "Fail") : String { + try { + block() + } catch (e: Exception1) { + exception(e) + } finally { + finallyBlock() + } + return res +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.2.kt deleted file mode 100644 index d5d44c569ab..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.2.kt +++ /dev/null @@ -1,32 +0,0 @@ -package test - -public class Exception1(message: String) : java.lang.RuntimeException(message) - -public class Exception2(message: String) : java.lang.RuntimeException(message) - -public inline fun doCall(block: ()-> String, exception1: (e: Exception)-> Unit, exception2: (e: Exception)-> Unit, finallyBlock: ()-> String, - exception3: (e: Exception)-> Unit, exception4: (e: Exception)-> Unit, finallyBlock2: ()-> String, res: String = "Fail") : String { - try { - try { - block() - } - catch (e: Exception1) { - exception1(e) - } - catch (e: Exception2) { - exception2(e) - } - finally { - finallyBlock() - } - } catch (e: Exception1) { - exception3(e) - } - catch (e: Exception2) { - exception4(e) - } - finally { - finallyBlock2() - } - return res -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt similarity index 77% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt index 3a38a10b715..e16dbe80d72 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt @@ -1,3 +1,40 @@ +// FILE: 1.kt + +package test + +public class Exception1(message: String) : java.lang.RuntimeException(message) + +public class Exception2(message: String) : java.lang.RuntimeException(message) + +public inline fun doCall(block: ()-> String, exception1: (e: Exception)-> Unit, exception2: (e: Exception)-> Unit, finallyBlock: ()-> String, + exception3: (e: Exception)-> Unit, exception4: (e: Exception)-> Unit, finallyBlock2: ()-> String, res: String = "Fail") : String { + try { + try { + block() + } + catch (e: Exception1) { + exception1(e) + } + catch (e: Exception2) { + exception2(e) + } + finally { + finallyBlock() + } + } catch (e: Exception1) { + exception3(e) + } + catch (e: Exception2) { + exception4(e) + } + finally { + finallyBlock2() + } + return res +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.2.kt deleted file mode 100644 index 884af8f5a2b..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.2.kt +++ /dev/null @@ -1,30 +0,0 @@ -package test - -public class Exception1(message: String) : java.lang.RuntimeException(message) - -public class Exception2(message: String) : java.lang.RuntimeException(message) - -public inline fun doCall(block: ()-> String, exception1: (e: Exception)-> Unit, finallyBlock: ()-> String, - exception3: (e: Exception)-> Unit, finallyBlock2: ()-> String, res: String = "Fail") : String { - try { - try { - block() - } - catch (e: Exception1) { - exception1(e) - } - finally { - if (true) { - finallyBlock() - /*External finally would be injected here*/ - return res + "_INNER_FINALLY" - } - } - } catch (e: Exception2) { - exception3(e) - } - finally { - finallyBlock2() - } - return res -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt similarity index 86% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt index c7d3dcee252..cf3bd8a595b 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt @@ -1,3 +1,38 @@ +// FILE: 1.kt + +package test + +public class Exception1(message: String) : java.lang.RuntimeException(message) + +public class Exception2(message: String) : java.lang.RuntimeException(message) + +public inline fun doCall(block: ()-> String, exception1: (e: Exception)-> Unit, finallyBlock: ()-> String, + exception3: (e: Exception)-> Unit, finallyBlock2: ()-> String, res: String = "Fail") : String { + try { + try { + block() + } + catch (e: Exception1) { + exception1(e) + } + finally { + if (true) { + finallyBlock() + /*External finally would be injected here*/ + return res + "_INNER_FINALLY" + } + } + } catch (e: Exception2) { + exception3(e) + } + finally { + finallyBlock2() + } + return res +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.2.kt deleted file mode 100644 index 4e5daf86c27..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.2.kt +++ /dev/null @@ -1,24 +0,0 @@ -package test - -public class Exception1(message: String) : java.lang.RuntimeException(message) - -public class Exception2(message: String) : java.lang.RuntimeException(message) - -public inline fun doCall(block: ()-> String, finallyBlock: ()-> String, - finallyBlock2: ()-> String, res: String = "Fail") : String { - try { - try { - block() - } - finally { - if (true) { - finallyBlock() - /*External finally would be injected here*/ - return res + "_INNER_FINALLY" - } - } - } finally { - finallyBlock2() - } - return res -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt similarity index 66% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt index 5499d5f5138..dfc4e9a3475 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt @@ -1,3 +1,32 @@ +// FILE: 1.kt + +package test + +public class Exception1(message: String) : java.lang.RuntimeException(message) + +public class Exception2(message: String) : java.lang.RuntimeException(message) + +public inline fun doCall(block: ()-> String, finallyBlock: ()-> String, + finallyBlock2: ()-> String, res: String = "Fail") : String { + try { + try { + block() + } + finally { + if (true) { + finallyBlock() + /*External finally would be injected here*/ + return res + "_INNER_FINALLY" + } + } + } finally { + finallyBlock2() + } + return res +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.2.kt deleted file mode 100644 index d44c53a3472..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package test - -public inline fun doCall(block: ()-> String, exception: (e: Exception)-> Unit) : String { - try { - return block() - } catch (e: Exception) { - exception(e) - } - return "Fail in doCall" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt similarity index 91% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt index e81b706393b..692038efb6c 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt @@ -1,3 +1,18 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> String, exception: (e: Exception)-> Unit) : String { + try { + return block() + } catch (e: Exception) { + exception(e) + } + return "Fail in doCall" +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.2.kt deleted file mode 100644 index b7601296aed..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.2.kt +++ /dev/null @@ -1,29 +0,0 @@ -package test - -public class Exception1(message: String) : java.lang.RuntimeException(message) - -public class Exception2(message: String) : java.lang.RuntimeException(message) - -public inline fun doCall(block: ()-> String, exception: (e: Exception)-> Unit, exception2: (e: Exception)-> Unit, finallyBlock: ()-> String, res: String = "Fail") : String { - try { - block() - } catch (e: Exception1) { - exception(e) - } catch (e: Exception2) { - exception2(e) - } finally { - finallyBlock() - } - return res -} - -public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R) : R { - try { - return block() - } catch (e: Exception) { - exception(e) - } finally { - finallyBlock() - } - throw java.lang.RuntimeException("fail") -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt similarity index 89% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt index 68d7ee9c83b..6f62c9c06b9 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt @@ -1,3 +1,37 @@ +// FILE: 1.kt + +package test + +public class Exception1(message: String) : java.lang.RuntimeException(message) + +public class Exception2(message: String) : java.lang.RuntimeException(message) + +public inline fun doCall(block: ()-> String, exception: (e: Exception)-> Unit, exception2: (e: Exception)-> Unit, finallyBlock: ()-> String, res: String = "Fail") : String { + try { + block() + } catch (e: Exception1) { + exception(e) + } catch (e: Exception2) { + exception2(e) + } finally { + finallyBlock() + } + return res +} + +public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R) : R { + try { + return block() + } catch (e: Exception) { + exception(e) + } finally { + finallyBlock() + } + throw java.lang.RuntimeException("fail") +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.2.kt deleted file mode 100644 index d23f1e56beb..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R, res: R) : R { - try { - return block() - } catch (e: Exception) { - exception(e) - } finally { - finallyBlock() - } - return res -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt similarity index 94% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt index b6d442fecb8..3f5ff6a3b80 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt @@ -1,3 +1,20 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R, res: R) : R { + try { + return block() + } catch (e: Exception) { + exception(e) + } finally { + finallyBlock() + } + return res +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.2.kt deleted file mode 100644 index dcf18fa5923..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.2.kt +++ /dev/null @@ -1,11 +0,0 @@ -package test - -public inline fun mysynchronized(lock: Any, block: () -> R): R { - try { - return block() - } - finally { - //do nothing - 1 - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt similarity index 57% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt index 20c72b783fa..8d65345bbb7 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt @@ -1,3 +1,19 @@ +// FILE: 1.kt + +package test + +public inline fun mysynchronized(lock: Any, block: () -> R): R { + try { + return block() + } + finally { + //do nothing + 1 + } +} + +// FILE: 2.kt + import test.* fun call(): String { @@ -15,4 +31,4 @@ fun box(): String { val call = call() if (call != "nonLocal") return "fail $call" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.2.kt deleted file mode 100644 index 9021841182a..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.2.kt +++ /dev/null @@ -1,22 +0,0 @@ -package test - -public inline fun doCall(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R) : R { - try { - return block() - } catch (e: Exception) { - exception(e) - } finally { - return finallyBlock() - } -} - -public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R) : R { - try { - return block() - } catch (e: Exception) { - exception(e) - } finally { - finallyBlock() - } - throw java.lang.RuntimeException("fail") -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt similarity index 88% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt index 478e3bf8470..db3823b522c 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt @@ -1,3 +1,30 @@ +// FILE: 1.kt + +package test + +public inline fun doCall(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R) : R { + try { + return block() + } catch (e: Exception) { + exception(e) + } finally { + return finallyBlock() + } +} + +public inline fun doCall2(block: ()-> R, exception: (e: Exception)-> Unit, finallyBlock: ()-> R) : R { + try { + return block() + } catch (e: Exception) { + exception(e) + } finally { + finallyBlock() + } + throw java.lang.RuntimeException("fail") +} + +// FILE: 2.kt + import test.* class Holder { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.2.kt deleted file mode 100644 index 8c70391c0cd..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.2.kt +++ /dev/null @@ -1,36 +0,0 @@ -package test - -public class Holder(var value: String = "") { - - operator fun plusAssign(s: String?) { - if (value.length != 0) { - value += " -> " - } - value += s - } - - override fun toString(): String { - return value - } - -} - -public class Exception1(message: String) : java.lang.RuntimeException(message) - -public class Exception2(message: String) : java.lang.RuntimeException(message) - -public inline fun doCall(block: ()-> String, finallyBlock: ()-> String, - tryBlock2: ()-> String, catchBlock2: ()-> String, res: String = "Fail") : String { - try { - block() - } - finally { - finallyBlock() - try { - tryBlock2() - } catch (e: Exception) { - catchBlock2() - } - } - return res -} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt similarity index 62% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt index cd099ff0ead..3b1ed17c35f 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt @@ -1,3 +1,44 @@ +// FILE: 1.kt + +package test + +public class Holder(var value: String = "") { + + operator fun plusAssign(s: String?) { + if (value.length != 0) { + value += " -> " + } + value += s + } + + override fun toString(): String { + return value + } + +} + +public class Exception1(message: String) : java.lang.RuntimeException(message) + +public class Exception2(message: String) : java.lang.RuntimeException(message) + +public inline fun doCall(block: ()-> String, finallyBlock: ()-> String, + tryBlock2: ()-> String, catchBlock2: ()-> String, res: String = "Fail") : String { + try { + block() + } + finally { + finallyBlock() + try { + tryBlock2() + } catch (e: Exception) { + catchBlock2() + } + } + return res +} + +// FILE: 2.kt + import test.* diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.2.kt deleted file mode 100644 index cfce790625d..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.2.kt +++ /dev/null @@ -1,13 +0,0 @@ -package test - -inline fun baz(x: Int) {} - -inline fun foo(action: () -> T): T { - baz(0) - try { - return action() - } finally { - baz(1) - } -} - diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt similarity index 55% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt index 1483e722451..230950ad26c 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt @@ -1,3 +1,20 @@ +// FILE: 1.kt + +package test + +inline fun baz(x: Int) {} + +inline fun foo(action: () -> T): T { + baz(0) + try { + return action() + } finally { + baz(1) + } +} + +// FILE: 2.kt + import test.* inline fun bar(arg: String, action: () -> T) { @@ -16,4 +33,4 @@ fun box(): String { } return "fail" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.1.kt deleted file mode 100644 index 481f251a94b..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.1.kt +++ /dev/null @@ -1,10 +0,0 @@ -fun box(): String { - try { - test { - return@box "OK" - } - } finally { - } - - return "fail" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.2.kt deleted file mode 100644 index ac04e885dbd..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.2.kt +++ /dev/null @@ -1,8 +0,0 @@ -inline fun test(s: () -> R): R { - var b = false - try { - return s() - } finally { - !b - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt new file mode 100644 index 00000000000..c5fa8d206bb --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt @@ -0,0 +1,23 @@ +// FILE: 1.kt + +inline fun test(s: () -> R): R { + var b = false + try { + return s() + } finally { + !b + } +} + +// FILE: 2.kt + +fun box(): String { + try { + test { + return@box "OK" + } + } finally { + } + + return "fail" +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.2.kt deleted file mode 100644 index e2a98ac6ed9..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -fun a(b: () -> String) : String { - return b() -} - -inline fun test(l: () -> String): String { - return l() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt similarity index 84% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt index ef2a0934107..90ad2de9c7c 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package test + +fun a(b: () -> String) : String { + return b() +} + +inline fun test(l: () -> String): String { + return l() +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -64,4 +78,4 @@ fun box(): String { if (test4() != "OK") return "fail 4: ${test4()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.2.kt deleted file mode 100644 index 767b6472bba..00000000000 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.2.kt +++ /dev/null @@ -1,15 +0,0 @@ -package test - -inline fun mySynchronized(lock: Any, block: () -> R): R { - monitorCall(lock) - try { - return block() - } - finally { - monitorCall(lock) - } -} - -fun monitorCall(lock: Any) { - -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.1.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt similarity index 76% rename from compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.1.kt rename to compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt index 70c93155682..46956552aeb 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.1.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt @@ -1,3 +1,23 @@ +// FILE: 1.kt + +package test + +inline fun mySynchronized(lock: Any, block: () -> R): R { + monitorCall(lock) + try { + return block() + } + finally { + monitorCall(lock) + } +} + +fun monitorCall(lock: Any) { + +} + +// FILE: 2.kt + import test.* public class ClassA { @@ -37,4 +57,3 @@ fun box(): String { classA.test("O", "K", false) return classA.result } - diff --git a/compiler/testData/codegen/boxInline/private/accessorForConst.1.kt b/compiler/testData/codegen/boxInline/private/accessorForConst.1.kt deleted file mode 100644 index 685111591d3..00000000000 --- a/compiler/testData/codegen/boxInline/private/accessorForConst.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return IntentionsBundle.message() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/accessorForConst.2.kt b/compiler/testData/codegen/boxInline/private/accessorForConst.kt similarity index 69% rename from compiler/testData/codegen/boxInline/private/accessorForConst.2.kt rename to compiler/testData/codegen/boxInline/private/accessorForConst.kt index 2664b118f7e..9d057efdda5 100644 --- a/compiler/testData/codegen/boxInline/private/accessorForConst.2.kt +++ b/compiler/testData/codegen/boxInline/private/accessorForConst.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class IntentionsBundle { @@ -11,4 +13,10 @@ class IntentionsBundle { } } +// FILE: 2.kt +import test.* + +fun box(): String { + return IntentionsBundle.message() +} diff --git a/compiler/testData/codegen/boxInline/private/accessorStability.1.kt b/compiler/testData/codegen/boxInline/private/accessorStability.1.kt deleted file mode 100644 index c1b657518ed..00000000000 --- a/compiler/testData/codegen/boxInline/private/accessorStability.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return call() -} diff --git a/compiler/testData/codegen/boxInline/private/accessorStability.2.kt b/compiler/testData/codegen/boxInline/private/accessorStability.kt similarity index 77% rename from compiler/testData/codegen/boxInline/private/accessorStability.2.kt rename to compiler/testData/codegen/boxInline/private/accessorStability.kt index 22f97564ff3..152d6215a45 100644 --- a/compiler/testData/codegen/boxInline/private/accessorStability.2.kt +++ b/compiler/testData/codegen/boxInline/private/accessorStability.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test fun call() = inlineFun2 { stub()} @@ -17,3 +19,11 @@ private fun test() = "OK" inline internal fun inlineFun(p: () -> String): String { return p() } + +// FILE: 2.kt + +import test.* + +fun box(): String { + return call() +} diff --git a/compiler/testData/codegen/boxInline/private/accessorStabilityInClass.1.kt b/compiler/testData/codegen/boxInline/private/accessorStabilityInClass.1.kt deleted file mode 100644 index a3ae3ba0db9..00000000000 --- a/compiler/testData/codegen/boxInline/private/accessorStabilityInClass.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return A().call() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/accessorStabilityInClass.2.kt b/compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt similarity index 79% rename from compiler/testData/codegen/boxInline/private/accessorStabilityInClass.2.kt rename to compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt index 5f5c3bb0ef2..f57b2f26be4 100644 --- a/compiler/testData/codegen/boxInline/private/accessorStabilityInClass.2.kt +++ b/compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class A { @@ -21,3 +23,11 @@ class A { } } + +// FILE: 2.kt + +import test.* + +fun box(): String { + return A().call() +} diff --git a/compiler/testData/codegen/boxInline/private/effectivePrivate.1.kt b/compiler/testData/codegen/boxInline/private/effectivePrivate.1.kt deleted file mode 100644 index 548a14e01c6..00000000000 --- a/compiler/testData/codegen/boxInline/private/effectivePrivate.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box() : String { - return Test().run() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/effectivePrivate.2.kt b/compiler/testData/codegen/boxInline/private/effectivePrivate.kt similarity index 82% rename from compiler/testData/codegen/boxInline/private/effectivePrivate.2.kt rename to compiler/testData/codegen/boxInline/private/effectivePrivate.kt index 57c676fff88..c177e30a453 100644 --- a/compiler/testData/codegen/boxInline/private/effectivePrivate.2.kt +++ b/compiler/testData/codegen/boxInline/private/effectivePrivate.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class Test { @@ -18,4 +20,12 @@ class Test { fun run(): String { return Extender().doSomething(); } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box() : String { + return Test().run() +} diff --git a/compiler/testData/codegen/boxInline/private/kt6453.1.kt b/compiler/testData/codegen/boxInline/private/kt6453.1.kt deleted file mode 100644 index aadb1f4eff1..00000000000 --- a/compiler/testData/codegen/boxInline/private/kt6453.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - var r = "fail" - A().foo { r = it } - return r -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/kt6453.2.kt b/compiler/testData/codegen/boxInline/private/kt6453.2.kt deleted file mode 100644 index 2a0b055ae6f..00000000000 --- a/compiler/testData/codegen/boxInline/private/kt6453.2.kt +++ /dev/null @@ -1,8 +0,0 @@ -package test - -class A() { - private val x = "OK" - internal inline fun foo(p: (String) -> Unit) { - p(x) - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/kt6453.kt b/compiler/testData/codegen/boxInline/private/kt6453.kt new file mode 100644 index 00000000000..1714c3ebcbf --- /dev/null +++ b/compiler/testData/codegen/boxInline/private/kt6453.kt @@ -0,0 +1,20 @@ +// FILE: 1.kt + +package test + +class A() { + private val x = "OK" + internal inline fun foo(p: (String) -> Unit) { + p(x) + } +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var r = "fail" + A().foo { r = it } + return r +} diff --git a/compiler/testData/codegen/boxInline/private/kt8094.1.kt b/compiler/testData/codegen/boxInline/private/kt8094.1.kt deleted file mode 100644 index 8665d107c17..00000000000 --- a/compiler/testData/codegen/boxInline/private/kt8094.1.kt +++ /dev/null @@ -1,8 +0,0 @@ -import test.* - -fun box(): String { - var r = "fail" - X.g { r = "OK" } - - return r; -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/kt8094.2.kt b/compiler/testData/codegen/boxInline/private/kt8094.kt similarity index 50% rename from compiler/testData/codegen/boxInline/private/kt8094.2.kt rename to compiler/testData/codegen/boxInline/private/kt8094.kt index b0c0aec6915..ef22ca47d34 100644 --- a/compiler/testData/codegen/boxInline/private/kt8094.2.kt +++ b/compiler/testData/codegen/boxInline/private/kt8094.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test object X { @@ -8,3 +10,14 @@ object X { f() } } + +// FILE: 2.kt + +import test.* + +fun box(): String { + var r = "fail" + X.g { r = "OK" } + + return r; +} diff --git a/compiler/testData/codegen/boxInline/private/kt8095.1.kt b/compiler/testData/codegen/boxInline/private/kt8095.1.kt deleted file mode 100644 index 0e417b136fd..00000000000 --- a/compiler/testData/codegen/boxInline/private/kt8095.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - var r = "fail" - C("OK").g { r = it } - return r -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/kt8095.2.kt b/compiler/testData/codegen/boxInline/private/kt8095.2.kt deleted file mode 100644 index bbeb6a4f940..00000000000 --- a/compiler/testData/codegen/boxInline/private/kt8095.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -class C(private val a : String) { - internal inline fun g(x: (s: String) -> Unit) { - x(a) - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/kt8095.kt b/compiler/testData/codegen/boxInline/private/kt8095.kt new file mode 100644 index 00000000000..3cd6ed10474 --- /dev/null +++ b/compiler/testData/codegen/boxInline/private/kt8095.kt @@ -0,0 +1,19 @@ +// FILE: 1.kt + +package test + +class C(private val a : String) { + internal inline fun g(x: (s: String) -> Unit) { + x(a) + } +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var r = "fail" + C("OK").g { r = it } + return r +} diff --git a/compiler/testData/codegen/boxInline/private/nestedInPrivateClass.1.kt b/compiler/testData/codegen/boxInline/private/nestedInPrivateClass.1.kt deleted file mode 100644 index a047c4ad04d..00000000000 --- a/compiler/testData/codegen/boxInline/private/nestedInPrivateClass.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - return call { - "O" - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/nestedInPrivateClass.2.kt b/compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt similarity index 82% rename from compiler/testData/codegen/boxInline/private/nestedInPrivateClass.2.kt rename to compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt index f1e5aae93c8..13bc819cd1a 100644 --- a/compiler/testData/codegen/boxInline/private/nestedInPrivateClass.2.kt +++ b/compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test private class S public constructor() { @@ -15,4 +17,14 @@ internal inline fun call(s: () -> String): String { private fun test(): S.Z { return S.Z() -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + return call { + "O" + } +} diff --git a/compiler/testData/codegen/boxInline/private/privateClass.1.kt b/compiler/testData/codegen/boxInline/private/privateClass.1.kt deleted file mode 100644 index a047c4ad04d..00000000000 --- a/compiler/testData/codegen/boxInline/private/privateClass.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -fun box(): String { - return call { - "O" - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/privateClass.2.kt b/compiler/testData/codegen/boxInline/private/privateClass.kt similarity index 82% rename from compiler/testData/codegen/boxInline/private/privateClass.2.kt rename to compiler/testData/codegen/boxInline/private/privateClass.kt index 44f5b751397..4ffa7890dda 100644 --- a/compiler/testData/codegen/boxInline/private/privateClass.2.kt +++ b/compiler/testData/codegen/boxInline/private/privateClass.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test private class S { @@ -20,4 +22,14 @@ private fun test(): S { private fun test2(s: S): String { return s.a() -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + return call { + "O" + } +} diff --git a/compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.1.kt b/compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.1.kt deleted file mode 100644 index c7aaa4d6db1..00000000000 --- a/compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return call() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.2.kt b/compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt similarity index 87% rename from compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.2.kt rename to compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt index 9b00d998d2e..03a5c694d58 100644 --- a/compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.2.kt +++ b/compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test private class S { @@ -22,4 +24,12 @@ internal fun call(): String { return S().call { "O" } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + return call() +} diff --git a/compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.1.kt b/compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.1.kt deleted file mode 100644 index d2766156005..00000000000 --- a/compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return A().call(); -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.2.kt b/compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt similarity index 73% rename from compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.2.kt rename to compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt index 554c97a26c2..8ac16cf60dd 100644 --- a/compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.2.kt +++ b/compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + @file:kotlin.jvm.JvmMultifileClass @file:kotlin.jvm.JvmName("TestKt") package test @@ -13,3 +15,11 @@ inline internal fun inlineFun(): String { class A () { fun call() = inlineFun() } + +// FILE: 2.kt + +import test.* + +fun box(): String { + return A().call(); +} diff --git a/compiler/testData/codegen/boxInline/private/privateInline.1.kt b/compiler/testData/codegen/boxInline/private/privateInline.1.kt deleted file mode 100644 index d5e0bd1261b..00000000000 --- a/compiler/testData/codegen/boxInline/private/privateInline.1.kt +++ /dev/null @@ -1,4 +0,0 @@ -import test.* -fun box(): String { - return A().call(); -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/private/privateInline.2.kt b/compiler/testData/codegen/boxInline/private/privateInline.kt similarity index 66% rename from compiler/testData/codegen/boxInline/private/privateInline.2.kt rename to compiler/testData/codegen/boxInline/private/privateInline.kt index 68dba621454..13c632f2e17 100644 --- a/compiler/testData/codegen/boxInline/private/privateInline.2.kt +++ b/compiler/testData/codegen/boxInline/private/privateInline.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test private val prop = "O" @@ -12,3 +14,9 @@ class A () { fun call() = inlineFun() } +// FILE: 2.kt + +import test.* +fun box(): String { + return A().call(); +} diff --git a/compiler/testData/codegen/boxInline/reified/capturedLambda.1.kt b/compiler/testData/codegen/boxInline/reified/capturedLambda.1.kt deleted file mode 100644 index 8af5a7c91a6..00000000000 --- a/compiler/testData/codegen/boxInline/reified/capturedLambda.1.kt +++ /dev/null @@ -1,8 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -val x: () -> String = foo() - -fun box(): String { - return x() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/capturedLambda.2.kt b/compiler/testData/codegen/boxInline/reified/capturedLambda.2.kt deleted file mode 100644 index 91bef0e4d27..00000000000 --- a/compiler/testData/codegen/boxInline/reified/capturedLambda.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -inline fun foo() = bar() {"OK"} -inline fun bar(crossinline y: () -> String) = { - null is E - run(y) -} - -public inline fun call(f: () -> T): T = f() \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/capturedLambda.kt b/compiler/testData/codegen/boxInline/reified/capturedLambda.kt new file mode 100644 index 00000000000..ef5b92aa7ad --- /dev/null +++ b/compiler/testData/codegen/boxInline/reified/capturedLambda.kt @@ -0,0 +1,22 @@ +// FILE: 1.kt + +package test + +inline fun foo() = bar() {"OK"} +inline fun bar(crossinline y: () -> String) = { + null is E + run(y) +} + +public inline fun call(f: () -> T): T = f() + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +val x: () -> String = foo() + +fun box(): String { + return x() +} diff --git a/compiler/testData/codegen/boxInline/reified/capturedLambda2.1.kt b/compiler/testData/codegen/boxInline/reified/capturedLambda2.1.kt deleted file mode 100644 index 52717715da2..00000000000 --- a/compiler/testData/codegen/boxInline/reified/capturedLambda2.1.kt +++ /dev/null @@ -1,8 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -inline fun foo() = bar() {"OK"} - -fun box(): String { - return foo()() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/capturedLambda2.2.kt b/compiler/testData/codegen/boxInline/reified/capturedLambda2.2.kt deleted file mode 100644 index 77ebb416d6e..00000000000 --- a/compiler/testData/codegen/boxInline/reified/capturedLambda2.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -inline fun bar(crossinline tasksFactory: () -> T) = { - null is R - run(tasksFactory) -} - -public inline fun call(f: () -> T): T = f() - diff --git a/compiler/testData/codegen/boxInline/reified/capturedLambda2.kt b/compiler/testData/codegen/boxInline/reified/capturedLambda2.kt new file mode 100644 index 00000000000..dd19276d19e --- /dev/null +++ b/compiler/testData/codegen/boxInline/reified/capturedLambda2.kt @@ -0,0 +1,21 @@ +// FILE: 1.kt + +package test + +inline fun bar(crossinline tasksFactory: () -> T) = { + null is R + run(tasksFactory) +} + +public inline fun call(f: () -> T): T = f() + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +inline fun foo() = bar() {"OK"} + +fun box(): String { + return foo()() +} diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/chain.2.kt b/compiler/testData/codegen/boxInline/reified/checkCast/chain.2.kt deleted file mode 100644 index 76cb778209b..00000000000 --- a/compiler/testData/codegen/boxInline/reified/checkCast/chain.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package test - -class A -class B - -inline fun Any?.foo(): T = this as T - -inline fun Any?.foo2(): Y? = foo() - -inline fun Any?.foo3(): Z? = foo2() diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/chain.1.kt b/compiler/testData/codegen/boxInline/reified/checkCast/chain.kt similarity index 77% rename from compiler/testData/codegen/boxInline/reified/checkCast/chain.1.kt rename to compiler/testData/codegen/boxInline/reified/checkCast/chain.kt index b7751035b64..1c527785e8f 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/chain.1.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/chain.kt @@ -1,3 +1,18 @@ +// FILE: 1.kt + +package test + +class A +class B + +inline fun Any?.foo(): T = this as T + +inline fun Any?.foo2(): Y? = foo() + +inline fun Any?.foo3(): Z? = foo2() + +// FILE: 2.kt + import test.* fun box(): String { @@ -33,4 +48,4 @@ inline fun failClassCast(s: () -> Unit) { catch (e: ClassCastException) { } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/kt8043.2.kt b/compiler/testData/codegen/boxInline/reified/checkCast/kt8043.2.kt deleted file mode 100644 index 8f46d861b98..00000000000 --- a/compiler/testData/codegen/boxInline/reified/checkCast/kt8043.2.kt +++ /dev/null @@ -1,3 +0,0 @@ -package test - -inline fun T.castTo(): R = this as R diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/kt8043.1.kt b/compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt similarity index 71% rename from compiler/testData/codegen/boxInline/reified/checkCast/kt8043.1.kt rename to compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt index 69133d263d3..5281f35a86c 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/kt8043.1.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt @@ -1,3 +1,11 @@ +// FILE: 1.kt + +package test + +inline fun T.castTo(): R = this as R + +// FILE: 2.kt + import test.* fun case1(): Int = @@ -15,4 +23,4 @@ inline fun failTypeCast(s: () -> Unit) { catch (e: TypeCastException) { } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/maxStack.1.kt b/compiler/testData/codegen/boxInline/reified/checkCast/maxStack.1.kt deleted file mode 100644 index c1063d1071a..00000000000 --- a/compiler/testData/codegen/boxInline/reified/checkCast/maxStack.1.kt +++ /dev/null @@ -1,10 +0,0 @@ -import test.* - - - -fun box(): String { - val a = A() - if (a.foo() != a) return "failTypeCast 5" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/maxStack.2.kt b/compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt similarity index 58% rename from compiler/testData/codegen/boxInline/reified/checkCast/maxStack.2.kt rename to compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt index 9e7cd2d1858..6854bef017e 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/maxStack.2.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class A @@ -11,3 +13,15 @@ inline fun Any?.foo(): T { return this as T } +// FILE: 2.kt + +import test.* + + + +fun box(): String { + val a = A() + if (a.foo() != a) return "failTypeCast 5" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/nullable.2.kt b/compiler/testData/codegen/boxInline/reified/checkCast/nullable.2.kt deleted file mode 100644 index 2f4aee24d93..00000000000 --- a/compiler/testData/codegen/boxInline/reified/checkCast/nullable.2.kt +++ /dev/null @@ -1,6 +0,0 @@ -package test - -class A -class B - -inline fun Any?.foo(): T? = this as T? diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/nullable.1.kt b/compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt similarity index 88% rename from compiler/testData/codegen/boxInline/reified/checkCast/nullable.1.kt rename to compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt index 161aa98d7c9..8876298611e 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/nullable.1.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt @@ -1,3 +1,14 @@ +// FILE: 1.kt + +package test + +class A +class B + +inline fun Any?.foo(): T? = this as T? + +// FILE: 2.kt + import test.* fun box(): String { @@ -42,4 +53,4 @@ inline fun failClassCast(s: () -> Unit) { catch (e: ClassCastException) { } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/simple.2.kt b/compiler/testData/codegen/boxInline/reified/checkCast/simple.2.kt deleted file mode 100644 index c7a894a398f..00000000000 --- a/compiler/testData/codegen/boxInline/reified/checkCast/simple.2.kt +++ /dev/null @@ -1,6 +0,0 @@ -package test - -class A -class B - -inline fun Any?.foo(): T = this as T diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/simple.1.kt b/compiler/testData/codegen/boxInline/reified/checkCast/simple.kt similarity index 89% rename from compiler/testData/codegen/boxInline/reified/checkCast/simple.1.kt rename to compiler/testData/codegen/boxInline/reified/checkCast/simple.kt index baf99b56ccf..950c3797131 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/simple.1.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/simple.kt @@ -1,3 +1,14 @@ +// FILE: 1.kt + +package test + +class A +class B + +inline fun Any?.foo(): T = this as T + +// FILE: 2.kt + import test.* fun box(): String { @@ -42,4 +53,4 @@ inline fun failClassCast(s: () -> Unit) { catch (e: ClassCastException) { } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.2.kt b/compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.2.kt deleted file mode 100644 index 21999c85c20..00000000000 --- a/compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.2.kt +++ /dev/null @@ -1,6 +0,0 @@ -package test - -class A -class B - -inline fun Any?.foo(): T? = this as? T diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.1.kt b/compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt similarity index 88% rename from compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.1.kt rename to compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt index bcfdc5da6ef..6fbfb5b1721 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.1.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt @@ -1,3 +1,14 @@ +// FILE: 1.kt + +package test + +class A +class B + +inline fun Any?.foo(): T? = this as? T + +// FILE: 2.kt + import test.* fun box(): String { @@ -42,4 +53,4 @@ inline fun failClassCast(s: () -> Unit) { catch (e: ClassCastException) { } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/isCheck/chain.2.kt b/compiler/testData/codegen/boxInline/reified/isCheck/chain.2.kt deleted file mode 100644 index c5d6e4f3a46..00000000000 --- a/compiler/testData/codegen/boxInline/reified/isCheck/chain.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package test - -class A -class B - -inline fun Any?.foo() = this is T - -inline fun Any?.foo2() = foo() - -inline fun Any?.foo3() = foo2() diff --git a/compiler/testData/codegen/boxInline/reified/isCheck/chain.1.kt b/compiler/testData/codegen/boxInline/reified/isCheck/chain.kt similarity index 73% rename from compiler/testData/codegen/boxInline/reified/isCheck/chain.1.kt rename to compiler/testData/codegen/boxInline/reified/isCheck/chain.kt index ba088c058b9..ae13d3c44ae 100644 --- a/compiler/testData/codegen/boxInline/reified/isCheck/chain.1.kt +++ b/compiler/testData/codegen/boxInline/reified/isCheck/chain.kt @@ -1,3 +1,18 @@ +// FILE: 1.kt + +package test + +class A +class B + +inline fun Any?.foo() = this is T + +inline fun Any?.foo2() = foo() + +inline fun Any?.foo3() = foo2() + +// FILE: 2.kt + import test.* fun box(): String { @@ -21,4 +36,4 @@ fun box(): String { if (b.foo3() != false) return "fail 10" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/isCheck/nullable.2.kt b/compiler/testData/codegen/boxInline/reified/isCheck/nullable.2.kt deleted file mode 100644 index 9c93bb19fa6..00000000000 --- a/compiler/testData/codegen/boxInline/reified/isCheck/nullable.2.kt +++ /dev/null @@ -1,6 +0,0 @@ -package test - -class A -class B - -inline fun Any?.foo() = this is T? \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/isCheck/nullable.1.kt b/compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt similarity index 83% rename from compiler/testData/codegen/boxInline/reified/isCheck/nullable.1.kt rename to compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt index c139c0ae4b6..e916456a979 100644 --- a/compiler/testData/codegen/boxInline/reified/isCheck/nullable.1.kt +++ b/compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt @@ -1,3 +1,14 @@ +// FILE: 1.kt + +package test + +class A +class B + +inline fun Any?.foo() = this is T? + +// FILE: 2.kt + import test.* fun box(): String { @@ -21,4 +32,4 @@ fun box(): String { if (b.foo() != false) return "fail 10" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/isCheck/simple.2.kt b/compiler/testData/codegen/boxInline/reified/isCheck/simple.2.kt deleted file mode 100644 index a1841b272cc..00000000000 --- a/compiler/testData/codegen/boxInline/reified/isCheck/simple.2.kt +++ /dev/null @@ -1,6 +0,0 @@ -package test - -class A -class B - -inline fun Any?.foo() = this is T \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/isCheck/simple.1.kt b/compiler/testData/codegen/boxInline/reified/isCheck/simple.kt similarity index 83% rename from compiler/testData/codegen/boxInline/reified/isCheck/simple.1.kt rename to compiler/testData/codegen/boxInline/reified/isCheck/simple.kt index 863ad2fa627..988f2538eaa 100644 --- a/compiler/testData/codegen/boxInline/reified/isCheck/simple.1.kt +++ b/compiler/testData/codegen/boxInline/reified/isCheck/simple.kt @@ -1,3 +1,14 @@ +// FILE: 1.kt + +package test + +class A +class B + +inline fun Any?.foo() = this is T + +// FILE: 2.kt + import test.* fun box(): String { @@ -21,4 +32,4 @@ fun box(): String { if (b.foo() != false) return "fail 10" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/kt11081.2.kt b/compiler/testData/codegen/boxInline/reified/kt11081.2.kt deleted file mode 100644 index 2e228905736..00000000000 --- a/compiler/testData/codegen/boxInline/reified/kt11081.2.kt +++ /dev/null @@ -1,21 +0,0 @@ -package test - -open class TypeRef { - val type = target() - - private fun target(): String { - val thisClass = this.javaClass - val superClass = thisClass.genericSuperclass - - return superClass.toString() - } -} - - - -inline fun typeWithMessage(message: String = "Hello"): String { - val type = object : TypeRef() {} - val target = type.type - - return message + " " + target -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/kt11081.1.kt b/compiler/testData/codegen/boxInline/reified/kt11081.kt similarity index 53% rename from compiler/testData/codegen/boxInline/reified/kt11081.1.kt rename to compiler/testData/codegen/boxInline/reified/kt11081.kt index 2d9636bfbcc..d967e239a06 100644 --- a/compiler/testData/codegen/boxInline/reified/kt11081.1.kt +++ b/compiler/testData/codegen/boxInline/reified/kt11081.kt @@ -1,3 +1,29 @@ +// FILE: 1.kt + +package test + +open class TypeRef { + val type = target() + + private fun target(): String { + val thisClass = this.javaClass + val superClass = thisClass.genericSuperclass + + return superClass.toString() + } +} + + + +inline fun typeWithMessage(message: String = "Hello"): String { + val type = object : TypeRef() {} + val target = type.type + + return message + " " + target +} + +// FILE: 2.kt + import test.* fun specifyOptionalArgument() = typeWithMessage>("Hello") @@ -14,4 +40,4 @@ fun box(): String { if (type != " test.TypeRef>") return "fail 2: $type" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/kt6988.1.kt b/compiler/testData/codegen/boxInline/reified/kt6988.1.kt deleted file mode 100644 index a83523e9ba0..00000000000 --- a/compiler/testData/codegen/boxInline/reified/kt6988.1.kt +++ /dev/null @@ -1,10 +0,0 @@ -import test.* - -public class A() - -fun box(): String { - val s = "yo".inlineMeIfYouCan()().call() - if (s !is A) return "fail" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/kt6988.2.kt b/compiler/testData/codegen/boxInline/reified/kt6988.kt similarity index 54% rename from compiler/testData/codegen/boxInline/reified/kt6988.2.kt rename to compiler/testData/codegen/boxInline/reified/kt6988.kt index a4658c5e741..92e7358b8d8 100644 --- a/compiler/testData/codegen/boxInline/reified/kt6988.2.kt +++ b/compiler/testData/codegen/boxInline/reified/kt6988.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test interface Call { @@ -8,4 +10,17 @@ public inline fun Any.inlineMeIfYouCan() : () -> Call = { object : Call { override fun call() = T::class.java.newInstance() } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +public class A() + +fun box(): String { + val s = "yo".inlineMeIfYouCan()().call() + if (s !is A) return "fail" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/reified/kt6988_2.1.kt b/compiler/testData/codegen/boxInline/reified/kt6988_2.1.kt deleted file mode 100644 index 60f80a52045..00000000000 --- a/compiler/testData/codegen/boxInline/reified/kt6988_2.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -import test.* - -fun box(): String { - "yo".inlineMeIfYouCan()().run() - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/kt6988_2.2.kt b/compiler/testData/codegen/boxInline/reified/kt6988_2.kt similarity index 59% rename from compiler/testData/codegen/boxInline/reified/kt6988_2.2.kt rename to compiler/testData/codegen/boxInline/reified/kt6988_2.kt index 1430bc495d1..8abb5cced0f 100644 --- a/compiler/testData/codegen/boxInline/reified/kt6988_2.2.kt +++ b/compiler/testData/codegen/boxInline/reified/kt6988_2.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test @@ -7,4 +9,13 @@ public inline fun Any.inlineMeIfYouCan() : () -> Runnable = { T::class.java.newInstance() } } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + "yo".inlineMeIfYouCan()().run() + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/reified/kt6990.1.kt b/compiler/testData/codegen/boxInline/reified/kt6990.1.kt deleted file mode 100644 index c021d6991b9..00000000000 --- a/compiler/testData/codegen/boxInline/reified/kt6990.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -import test.* - -class OK - -fun box(): String { - return inlineMeIfYouCan()!! -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/kt6990.2.kt b/compiler/testData/codegen/boxInline/reified/kt6990.kt similarity index 53% rename from compiler/testData/codegen/boxInline/reified/kt6990.2.kt rename to compiler/testData/codegen/boxInline/reified/kt6990.kt index 6b8ba9682cb..9ac695998a7 100644 --- a/compiler/testData/codegen/boxInline/reified/kt6990.2.kt +++ b/compiler/testData/codegen/boxInline/reified/kt6990.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public inline fun inlineMeIfYouCan(): String? = @@ -7,4 +9,14 @@ public inline fun inlineMeIfYouCan(): String? = } }() -inline fun f(x: () -> String) = x() \ No newline at end of file +inline fun f(x: () -> String) = x() + +// FILE: 2.kt + +import test.* + +class OK + +fun box(): String { + return inlineMeIfYouCan()!! +} diff --git a/compiler/testData/codegen/boxInline/reified/kt7017.1.kt b/compiler/testData/codegen/boxInline/reified/kt7017.1.kt deleted file mode 100644 index 9ff07ab1911..00000000000 --- a/compiler/testData/codegen/boxInline/reified/kt7017.1.kt +++ /dev/null @@ -1,9 +0,0 @@ -import test.* - -fun box(): String { - if (!test("OK")) return "fail 1" - - if (test("OK")) return "fail 2" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/kt7017.2.kt b/compiler/testData/codegen/boxInline/reified/kt7017.2.kt deleted file mode 100644 index 69528025b54..00000000000 --- a/compiler/testData/codegen/boxInline/reified/kt7017.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package test - -inline fun test(x: Any): Boolean { - val x = object { - val y = x is T - } - - return x.y -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/kt7017.kt b/compiler/testData/codegen/boxInline/reified/kt7017.kt new file mode 100644 index 00000000000..c5bdcbad2af --- /dev/null +++ b/compiler/testData/codegen/boxInline/reified/kt7017.kt @@ -0,0 +1,23 @@ +// FILE: 1.kt + +package test + +inline fun test(x: Any): Boolean { + val x = object { + val y = x is T + } + + return x.y +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + if (!test("OK")) return "fail 1" + + if (test("OK")) return "fail 2" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/reified/kt8047.1.kt b/compiler/testData/codegen/boxInline/reified/kt8047.1.kt deleted file mode 100644 index e155e12d2fb..00000000000 --- a/compiler/testData/codegen/boxInline/reified/kt8047.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -import test.* - -fun box(): String { - f() {} - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/reified/kt8047.2.kt b/compiler/testData/codegen/boxInline/reified/kt8047.2.kt deleted file mode 100644 index 26cc6832fdf..00000000000 --- a/compiler/testData/codegen/boxInline/reified/kt8047.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun f(x : () -> Unit) { - object { init { arrayOf() } } -} diff --git a/compiler/testData/codegen/boxInline/reified/kt8047.kt b/compiler/testData/codegen/boxInline/reified/kt8047.kt new file mode 100644 index 00000000000..78e6e09220c --- /dev/null +++ b/compiler/testData/codegen/boxInline/reified/kt8047.kt @@ -0,0 +1,16 @@ +// FILE: 1.kt + +package test + +inline fun f(x : () -> Unit) { + object { init { arrayOf() } } +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + f() {} + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/reified/kt9637.1.kt b/compiler/testData/codegen/boxInline/reified/kt9637.1.kt deleted file mode 100644 index f9f20035e7d..00000000000 --- a/compiler/testData/codegen/boxInline/reified/kt9637.1.kt +++ /dev/null @@ -1,15 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -class Boxer { - val box: () -> Box by injectFnc() -} - -fun box(): String { - val box = Box() - registerFnc { box } - val prop = Boxer().box - if (prop() != box) return "fail 1" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/kt9637.2.kt b/compiler/testData/codegen/boxInline/reified/kt9637.kt similarity index 59% rename from compiler/testData/codegen/boxInline/reified/kt9637.2.kt rename to compiler/testData/codegen/boxInline/reified/kt9637.kt index 7d3863a3817..b108d5a3086 100644 --- a/compiler/testData/codegen/boxInline/reified/kt9637.2.kt +++ b/compiler/testData/codegen/boxInline/reified/kt9637.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test import java.util.* @@ -13,4 +15,22 @@ inline fun registerFnc(noinline value: Function0) { valuesInjectFnc[T::class] = value } -public class Box \ No newline at end of file +public class Box + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +class Boxer { + val box: () -> Box by injectFnc() +} + +fun box(): String { + val box = Box() + registerFnc { box } + val prop = Boxer().box + if (prop() != box) return "fail 1" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/reified/kt9637_2.1.kt b/compiler/testData/codegen/boxInline/reified/kt9637_2.1.kt deleted file mode 100644 index f7a292de7cf..00000000000 --- a/compiler/testData/codegen/boxInline/reified/kt9637_2.1.kt +++ /dev/null @@ -1,8 +0,0 @@ -import test.* - -fun box(): String { - val boxClass = injectFnc() - if (boxClass != Box::class) return "fail 1" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/reified/kt9637_2.2.kt b/compiler/testData/codegen/boxInline/reified/kt9637_2.2.kt deleted file mode 100644 index 75a34e201b5..00000000000 --- a/compiler/testData/codegen/boxInline/reified/kt9637_2.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package test - -import kotlin.reflect.KClass - -inline fun injectFnc(): KClass = { - T::class -} () - -public class Box - diff --git a/compiler/testData/codegen/boxInline/reified/kt9637_2.kt b/compiler/testData/codegen/boxInline/reified/kt9637_2.kt new file mode 100644 index 00000000000..c73c2638623 --- /dev/null +++ b/compiler/testData/codegen/boxInline/reified/kt9637_2.kt @@ -0,0 +1,22 @@ +// FILE: 1.kt + +package test + +import kotlin.reflect.KClass + +inline fun injectFnc(): KClass = { + T::class +} () + +public class Box + +// FILE: 2.kt + +import test.* + +fun box(): String { + val boxClass = injectFnc() + if (boxClass != Box::class) return "fail 1" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/reified/packages.2.kt b/compiler/testData/codegen/boxInline/reified/packages.2.kt deleted file mode 100644 index e2533d10075..00000000000 --- a/compiler/testData/codegen/boxInline/reified/packages.2.kt +++ /dev/null @@ -1,19 +0,0 @@ -package test - -public abstract class A - -inline fun foo1(): A { - return object : A() { - - } -} - -fun bar(x: T, block: (T) -> Boolean): Boolean = block(x) - -inline fun foo2(x: Any): Boolean { - return bar(x) { it is T } -} - -inline fun foo3(x: Any, y: Any): Boolean { - return bar(x) { it is T && y is T } -} diff --git a/compiler/testData/codegen/boxInline/reified/packages.1.kt b/compiler/testData/codegen/boxInline/reified/packages.kt similarity index 51% rename from compiler/testData/codegen/boxInline/reified/packages.1.kt rename to compiler/testData/codegen/boxInline/reified/packages.kt index 7fa3e6360ac..b7bb717daef 100644 --- a/compiler/testData/codegen/boxInline/reified/packages.1.kt +++ b/compiler/testData/codegen/boxInline/reified/packages.kt @@ -1,3 +1,27 @@ +// FILE: 1.kt + +package test + +public abstract class A + +inline fun foo1(): A { + return object : A() { + + } +} + +fun bar(x: T, block: (T) -> Boolean): Boolean = block(x) + +inline fun foo2(x: Any): Boolean { + return bar(x) { it is T } +} + +inline fun foo3(x: Any, y: Any): Boolean { + return bar(x) { it is T && y is T } +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* diff --git a/compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.2.kt b/compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.2.kt deleted file mode 100644 index 326f2c37d8a..00000000000 --- a/compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - -interface F { - fun test(p: T) : Int -} - -inline fun Array.copyOfRange1(crossinline toIndex: () -> Int) = - object : F { - override fun test(p: T): Int { - return toIndex() - } - } diff --git a/compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.1.kt b/compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt similarity index 65% rename from compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.1.kt rename to compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt index 0f66c5ae2fd..3059b2f104c 100644 --- a/compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.1.kt +++ b/compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt @@ -1,3 +1,20 @@ +// FILE: 1.kt + +package test + +interface F { + fun test(p: T) : Int +} + +inline fun Array.copyOfRange1(crossinline toIndex: () -> Int) = + object : F { + override fun test(p: T): Int { + return toIndex() + } + } + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -14,4 +31,4 @@ fun box(): String { if (name != "java.lang.Object") return "fail 2: ${name}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.2.kt b/compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.2.kt deleted file mode 100644 index c7e25ef8375..00000000000 --- a/compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - -interface F { - fun test(p: T) : Int -} - -inline fun Array.copyOfRange1(crossinline toIndex: () -> Int) = - object : F { - override fun test(p: T): Int { - return toIndex() - } - } diff --git a/compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.1.kt b/compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt similarity index 66% rename from compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.1.kt rename to compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt index b3ce24539e2..72c062cd495 100644 --- a/compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.1.kt +++ b/compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt @@ -1,3 +1,20 @@ +// FILE: 1.kt + +package test + +interface F { + fun test(p: T) : Int +} + +inline fun Array.copyOfRange1(crossinline toIndex: () -> Int) = + object : F { + override fun test(p: T): Int { + return toIndex() + } + } + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -14,4 +31,4 @@ fun box(): String { if (name != "java.lang.CharSequence") return "fail 2: ${name}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/signature/recursion.2.kt b/compiler/testData/codegen/boxInline/signature/recursion.2.kt deleted file mode 100644 index 3fc6bd82dca..00000000000 --- a/compiler/testData/codegen/boxInline/signature/recursion.2.kt +++ /dev/null @@ -1,6 +0,0 @@ -package test - - -inline fun stub() { - -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/signature/recursion.1.kt b/compiler/testData/codegen/boxInline/signature/recursion.kt similarity index 79% rename from compiler/testData/codegen/boxInline/signature/recursion.1.kt rename to compiler/testData/codegen/boxInline/signature/recursion.kt index e28d59a2e3d..e748a4a8198 100644 --- a/compiler/testData/codegen/boxInline/signature/recursion.1.kt +++ b/compiler/testData/codegen/boxInline/signature/recursion.kt @@ -1,3 +1,14 @@ +// FILE: 1.kt + +package test + + +inline fun stub() { + +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -15,4 +26,3 @@ fun box(): String { return "OK" } - diff --git a/compiler/testData/codegen/boxInline/signature/sameFormalParameterName.2.kt b/compiler/testData/codegen/boxInline/signature/sameFormalParameterName.2.kt deleted file mode 100644 index 45b884a5b14..00000000000 --- a/compiler/testData/codegen/boxInline/signature/sameFormalParameterName.2.kt +++ /dev/null @@ -1,19 +0,0 @@ -package test - -class B - -interface A { - fun aTest(p: T): B -} - -open class Test { - - inline fun test(crossinline z: () -> Int) = object : A { - override fun aTest(p: T): B { - z() - return B() - } - } - - fun callInline() = test { 1 } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/signature/sameFormalParameterName.1.kt b/compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt similarity index 64% rename from compiler/testData/codegen/boxInline/signature/sameFormalParameterName.1.kt rename to compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt index 69588d01d08..481d65edac9 100644 --- a/compiler/testData/codegen/boxInline/signature/sameFormalParameterName.1.kt +++ b/compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt @@ -1,3 +1,27 @@ +// FILE: 1.kt + +package test + +class B + +interface A { + fun aTest(p: T): B +} + +open class Test { + + inline fun test(crossinline z: () -> Int) = object : A { + override fun aTest(p: T): B { + z() + return B() + } + } + + fun callInline() = test { 1 } +} + +// FILE: 2.kt + // NO_CHECK_LAMBDA_INLINING // FULL_JDK diff --git a/compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.2.kt b/compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.2.kt deleted file mode 100644 index d01b5136065..00000000000 --- a/compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.2.kt +++ /dev/null @@ -1,19 +0,0 @@ -package test - -class B - -interface A { - fun aTest(p: T): B -} - -open class Test { - - inline fun test(crossinline z: () -> Int) = object : A { - override fun aTest(p: T): B { - z() - return B() - } - } - - fun callInline() = test { 1 } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.1.kt b/compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt similarity index 63% rename from compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.1.kt rename to compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt index 69588d01d08..979e27ad546 100644 --- a/compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.1.kt +++ b/compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt @@ -1,3 +1,27 @@ +// FILE: 1.kt + +package test + +class B + +interface A { + fun aTest(p: T): B +} + +open class Test { + + inline fun test(crossinline z: () -> Int) = object : A { + override fun aTest(p: T): B { + z() + return B() + } + } + + fun callInline() = test { 1 } +} + +// FILE: 2.kt + // NO_CHECK_LAMBDA_INLINING // FULL_JDK diff --git a/compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.2.kt b/compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.2.kt deleted file mode 100644 index c7e25ef8375..00000000000 --- a/compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - -interface F { - fun test(p: T) : Int -} - -inline fun Array.copyOfRange1(crossinline toIndex: () -> Int) = - object : F { - override fun test(p: T): Int { - return toIndex() - } - } diff --git a/compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.1.kt b/compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt similarity index 65% rename from compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.1.kt rename to compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt index 4631b0e39bf..f0ee022399e 100644 --- a/compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.1.kt +++ b/compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt @@ -1,3 +1,20 @@ +// FILE: 1.kt + +package test + +interface F { + fun test(p: T) : Int +} + +inline fun Array.copyOfRange1(crossinline toIndex: () -> Int) = + object : F { + override fun test(p: T): Int { + return toIndex() + } + } + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -14,4 +31,4 @@ fun box(): String { if (name != "java.lang.Object") return "fail 2: ${name}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/signature/typeParameterInLambda.2.kt b/compiler/testData/codegen/boxInline/signature/typeParameterInLambda.2.kt deleted file mode 100644 index 5a446443d3a..00000000000 --- a/compiler/testData/codegen/boxInline/signature/typeParameterInLambda.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - -open class Test { - - inline fun test(z: () -> () -> Y) = z() - - fun callInline(p: T) = test { - { - p - } - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/signature/typeParameterInLambda.1.kt b/compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt similarity index 75% rename from compiler/testData/codegen/boxInline/signature/typeParameterInLambda.1.kt rename to compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt index dfc824037cb..f9a8a0bc9b1 100644 --- a/compiler/testData/codegen/boxInline/signature/typeParameterInLambda.1.kt +++ b/compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt @@ -1,3 +1,20 @@ +// FILE: 1.kt + +package test + +open class Test { + + inline fun test(z: () -> () -> Y) = z() + + fun callInline(p: T) = test { + { + p + } + } +} + +// FILE: 2.kt + // NO_CHECK_LAMBDA_INLINING // FULL_JDK diff --git a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.2.kt b/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.2.kt deleted file mode 100644 index 27c89623903..00000000000 --- a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.2.kt +++ /dev/null @@ -1,24 +0,0 @@ -package test - -import java.util.* - -open class CustomerService { - - fun comparator() = object : Comparator { - override fun compare(o1: T, o2: T): Int { - throw UnsupportedOperationException() - } - } - - inline fun comparator(crossinline z: () -> Int) = object : Comparator { - - override fun compare(o1: T, o2: T): Int { - return z() - } - - } - - fun callInline() = comparator { 1 } - -} - diff --git a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.1.kt b/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt similarity index 69% rename from compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.1.kt rename to compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt index 86edd16b453..219428d0fc9 100644 --- a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.1.kt +++ b/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt @@ -1,3 +1,31 @@ +// FILE: 1.kt + +package test + +import java.util.* + +open class CustomerService { + + fun comparator() = object : Comparator { + override fun compare(o1: T, o2: T): Int { + throw UnsupportedOperationException() + } + } + + inline fun comparator(crossinline z: () -> Int) = object : Comparator { + + override fun compare(o1: T, o2: T): Int { + return z() + } + + } + + fun callInline() = comparator { 1 } + +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -23,4 +51,4 @@ fun box(): String { if (name != "java.lang.String") return "fail 6: ${name}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.2.kt b/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.2.kt deleted file mode 100644 index 11eae8769b9..00000000000 --- a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.2.kt +++ /dev/null @@ -1,25 +0,0 @@ -package test - -interface MComparator { - fun compare(o1: T, o2: T): Int -} - -open class CustomerService { - - fun comparator() = object : MComparator { - override fun compare(o1: T, o2: T): Int { - throw UnsupportedOperationException() - } - } - - inline fun comparator(crossinline z: () -> Int) = object : MComparator { - - override fun compare(o1: T, o2: T): Int { - return z() - } - } - - fun callInline() = comparator { 1 } - -} - diff --git a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.1.kt b/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt similarity index 67% rename from compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.1.kt rename to compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt index 892a8220625..b6f5bcd2e35 100644 --- a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.1.kt +++ b/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt @@ -1,3 +1,32 @@ +// FILE: 1.kt + +package test + +interface MComparator { + fun compare(o1: T, o2: T): Int +} + +open class CustomerService { + + fun comparator() = object : MComparator { + override fun compare(o1: T, o2: T): Int { + throw UnsupportedOperationException() + } + } + + inline fun comparator(crossinline z: () -> Int) = object : MComparator { + + override fun compare(o1: T, o2: T): Int { + return z() + } + } + + fun callInline() = comparator { 1 } + +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -22,4 +51,4 @@ fun box(): String { if (name != "java.lang.String") return "fail 6: ${name}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/classObject.2.kt b/compiler/testData/codegen/boxInline/simple/classObject.2.kt deleted file mode 100644 index db338ff7687..00000000000 --- a/compiler/testData/codegen/boxInline/simple/classObject.2.kt +++ /dev/null @@ -1,18 +0,0 @@ -package test - -inline fun inline(s: () -> String): String { - return s() -} - -class InlineAll { - - inline fun inline(s: () -> String): String { - return s() - } - - companion object { - inline fun inline(s: () -> String): String { - return s() - } - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/simple/classObject.1.kt b/compiler/testData/codegen/boxInline/simple/classObject.kt similarity index 63% rename from compiler/testData/codegen/boxInline/simple/classObject.1.kt rename to compiler/testData/codegen/boxInline/simple/classObject.kt index 4d0f7cc3a67..5550e6e906b 100644 --- a/compiler/testData/codegen/boxInline/simple/classObject.1.kt +++ b/compiler/testData/codegen/boxInline/simple/classObject.kt @@ -1,3 +1,26 @@ +// FILE: 1.kt + +package test + +inline fun inline(s: () -> String): String { + return s() +} + +class InlineAll { + + inline fun inline(s: () -> String): String { + return s() + } + + companion object { + inline fun inline(s: () -> String): String { + return s() + } + } +} + +// FILE: 2.kt + import test.* fun testClassObjectCall(): String { @@ -18,4 +41,4 @@ fun box(): String { if (testInstanceCall() != "instance") return "test2: ${testInstanceCall()}" if (testPackageCall() != "package") return "test3: ${testPackageCall()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/extension.2.kt b/compiler/testData/codegen/boxInline/simple/extension.2.kt deleted file mode 100644 index b3ea121fc0b..00000000000 --- a/compiler/testData/codegen/boxInline/simple/extension.2.kt +++ /dev/null @@ -1,29 +0,0 @@ -inline fun Inline.calcExt(s: (Int) -> Int, p: Int) : Int { - return s(p) -} - -inline fun Inline.calcExt2(s: Int.() -> Int, p: Int) : Int { - return p.s() -} - -class InlineX(val value : Int) {} - -class Inline(val res: Int) { - - inline fun InlineX.calcInt(s: (Int, Int) -> Int) : Int { - return s(res, this.value) - } - - inline fun Double.calcDouble(s: (Int, Double) -> Double) : Double { - return s(res, this) - } - - fun doWork(l : InlineX) : Int { - return l.calcInt({ a: Int, b: Int -> a + b}) - } - - fun doWorkWithDouble(s : Double) : Double { - return s.calcDouble({ a: Int, b: Double -> a + b}) - } - -} diff --git a/compiler/testData/codegen/boxInline/simple/extension.1.kt b/compiler/testData/codegen/boxInline/simple/extension.kt similarity index 55% rename from compiler/testData/codegen/boxInline/simple/extension.1.kt rename to compiler/testData/codegen/boxInline/simple/extension.kt index c5ec0a15789..f9a0d136629 100644 --- a/compiler/testData/codegen/boxInline/simple/extension.1.kt +++ b/compiler/testData/codegen/boxInline/simple/extension.kt @@ -1,3 +1,37 @@ +// FILE: 1.kt + +inline fun Inline.calcExt(s: (Int) -> Int, p: Int) : Int { + return s(p) +} + +inline fun Inline.calcExt2(s: Int.() -> Int, p: Int) : Int { + return p.s() +} + +class InlineX(val value : Int) {} + +class Inline(val res: Int) { + + inline fun InlineX.calcInt(s: (Int, Int) -> Int) : Int { + return s(res, this.value) + } + + inline fun Double.calcDouble(s: (Int, Double) -> Double) : Double { + return s(res, this) + } + + fun doWork(l : InlineX) : Int { + return l.calcInt({ a: Int, b: Int -> a + b}) + } + + fun doWorkWithDouble(s : Double) : Double { + return s.calcDouble({ a: Int, b: Double -> a + b}) + } + +} + +// FILE: 2.kt + fun test1(): Int { val inlineX = Inline(9) return inlineX.calcExt({ z: Int -> z}, 25) @@ -34,4 +68,4 @@ fun box(): String { if (test5() != 20.0) return "test5: ${test5()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/extensionLambda.2.kt b/compiler/testData/codegen/boxInline/simple/extensionLambda.2.kt deleted file mode 100644 index 1c3b1968ade..00000000000 --- a/compiler/testData/codegen/boxInline/simple/extensionLambda.2.kt +++ /dev/null @@ -1,3 +0,0 @@ -package test - -inline fun String.test(default: T, cb: String.(T) -> T): T = cb(default) \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/simple/extensionLambda.1.kt b/compiler/testData/codegen/boxInline/simple/extensionLambda.kt similarity index 50% rename from compiler/testData/codegen/boxInline/simple/extensionLambda.1.kt rename to compiler/testData/codegen/boxInline/simple/extensionLambda.kt index c341a09eb6c..4360dda4d25 100644 --- a/compiler/testData/codegen/boxInline/simple/extensionLambda.1.kt +++ b/compiler/testData/codegen/boxInline/simple/extensionLambda.kt @@ -1,3 +1,11 @@ +// FILE: 1.kt + +package test + +inline fun String.test(default: T, cb: String.(T) -> T): T = cb(default) + +// FILE: 2.kt + import test.* fun box(): String { @@ -6,4 +14,4 @@ fun box(): String { } return if (p == 50.0) "OK" else "fail $p" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/params.2.kt b/compiler/testData/codegen/boxInline/simple/params.2.kt deleted file mode 100644 index f4ce53f635f..00000000000 --- a/compiler/testData/codegen/boxInline/simple/params.2.kt +++ /dev/null @@ -1,15 +0,0 @@ -class Inline() { - - inline fun foo1Int(s : (l: Int) -> Int, param: Int) : Int { - return s(param) - } - - inline fun foo1Double(param: Double, s : (l: Double) -> Double) : Double { - return s(param) - } - - inline fun foo2Param(param1: Double, s : (i: Int, l: Double) -> Double, param2: Int) : Double { - return s(param2, param1) - } -} - diff --git a/compiler/testData/codegen/boxInline/simple/params.1.kt b/compiler/testData/codegen/boxInline/simple/params.kt similarity index 66% rename from compiler/testData/codegen/boxInline/simple/params.1.kt rename to compiler/testData/codegen/boxInline/simple/params.kt index 478f9908dff..000719a13ae 100644 --- a/compiler/testData/codegen/boxInline/simple/params.1.kt +++ b/compiler/testData/codegen/boxInline/simple/params.kt @@ -1,3 +1,21 @@ +// FILE: 1.kt + +class Inline() { + + inline fun foo1Int(s : (l: Int) -> Int, param: Int) : Int { + return s(param) + } + + inline fun foo1Double(param: Double, s : (l: Double) -> Double) : Double { + return s(param) + } + + inline fun foo2Param(param1: Double, s : (i: Int, l: Double) -> Double, param2: Int) : Double { + return s(param2, param1) + } +} + +// FILE: 2.kt fun test1(): Int { val inlineX = Inline() @@ -29,4 +47,4 @@ fun box(): String { return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/rootConstructor.1.kt b/compiler/testData/codegen/boxInline/simple/rootConstructor.1.kt deleted file mode 100644 index 401f57cdd27..00000000000 --- a/compiler/testData/codegen/boxInline/simple/rootConstructor.1.kt +++ /dev/null @@ -1,10 +0,0 @@ -//NO_CHECK_LAMBDA_INLINING -import test.* - -val s = doWork({11}) - -fun box(): String { - if (s != 11) return "test1: ${s}" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/simple/rootConstructor.2.kt b/compiler/testData/codegen/boxInline/simple/rootConstructor.2.kt deleted file mode 100644 index 0dcea6524a2..00000000000 --- a/compiler/testData/codegen/boxInline/simple/rootConstructor.2.kt +++ /dev/null @@ -1,11 +0,0 @@ -package test - - -inline fun doWork(crossinline job: ()-> R) : R { - return notInline({job()}) -} - -fun notInline(job: ()-> R) : R { - return job() -} - diff --git a/compiler/testData/codegen/boxInline/simple/rootConstructor.kt b/compiler/testData/codegen/boxInline/simple/rootConstructor.kt new file mode 100644 index 00000000000..1af43ae7c06 --- /dev/null +++ b/compiler/testData/codegen/boxInline/simple/rootConstructor.kt @@ -0,0 +1,25 @@ +// FILE: 1.kt + +package test + + +inline fun doWork(crossinline job: ()-> R) : R { + return notInline({job()}) +} + +fun notInline(job: ()-> R) : R { + return job() +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING +import test.* + +val s = doWork({11}) + +fun box(): String { + if (s != 11) return "test1: ${s}" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/simple/safeCall.1.kt b/compiler/testData/codegen/boxInline/simple/safeCall.1.kt deleted file mode 100644 index 4891862f4ed..00000000000 --- a/compiler/testData/codegen/boxInline/simple/safeCall.1.kt +++ /dev/null @@ -1,10 +0,0 @@ -import test.* - -fun box(): String { - var result = "fail" - W("OK").safe { - result = this as String - } - - return result -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/simple/safeCall.2.kt b/compiler/testData/codegen/boxInline/simple/safeCall.2.kt deleted file mode 100644 index 15e6a219ae3..00000000000 --- a/compiler/testData/codegen/boxInline/simple/safeCall.2.kt +++ /dev/null @@ -1,8 +0,0 @@ -package test - -class W(val value: Any) - -inline fun W.safe(body : Any.() -> Unit) { - this.value?.body() -} - diff --git a/compiler/testData/codegen/boxInline/simple/safeCall.kt b/compiler/testData/codegen/boxInline/simple/safeCall.kt new file mode 100644 index 00000000000..a89a92c1ad6 --- /dev/null +++ b/compiler/testData/codegen/boxInline/simple/safeCall.kt @@ -0,0 +1,22 @@ +// FILE: 1.kt + +package test + +class W(val value: Any) + +inline fun W.safe(body : Any.() -> Unit) { + this.value?.body() +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var result = "fail" + W("OK").safe { + result = this as String + } + + return result +} diff --git a/compiler/testData/codegen/boxInline/simple/severalClosures.2.kt b/compiler/testData/codegen/boxInline/simple/severalClosures.2.kt deleted file mode 100644 index f8aeb881852..00000000000 --- a/compiler/testData/codegen/boxInline/simple/severalClosures.2.kt +++ /dev/null @@ -1,11 +0,0 @@ -class Inline() { - - inline fun foo1(closure1 : (l: Int) -> Int, param1: Int, closure2 : (l: Double) -> Double, param2: Double) : Double { - return closure1(param1) + closure2(param2) - } - - inline fun foo2(closure1 : (Int, Int) -> Int, param1: Int, closure2 : (Double, Int, Int) -> Double, param2: Double, param3: Int) : Double { - return closure1(param1, param3) + closure2(param2, param1, param3) - } -} - diff --git a/compiler/testData/codegen/boxInline/simple/severalClosures.1.kt b/compiler/testData/codegen/boxInline/simple/severalClosures.kt similarity index 59% rename from compiler/testData/codegen/boxInline/simple/severalClosures.1.kt rename to compiler/testData/codegen/boxInline/simple/severalClosures.kt index 21e7b47c5a2..a69bacf4572 100644 --- a/compiler/testData/codegen/boxInline/simple/severalClosures.1.kt +++ b/compiler/testData/codegen/boxInline/simple/severalClosures.kt @@ -1,3 +1,18 @@ +// FILE: 1.kt + +class Inline() { + + inline fun foo1(closure1 : (l: Int) -> Int, param1: Int, closure2 : (l: Double) -> Double, param2: Double) : Double { + return closure1(param1) + closure2(param2) + } + + inline fun foo2(closure1 : (Int, Int) -> Int, param1: Int, closure2 : (Double, Int, Int) -> Double, param2: Double, param3: Int) : Double { + return closure1(param1, param3) + closure2(param2, param1, param3) + } +} + +// FILE: 2.kt + fun test1(): Double { val inlineX = Inline() return inlineX.foo1({ z: Int -> z}, 25, { z: Double -> z}, 11.5) @@ -20,4 +35,4 @@ fun box(): String { if (test2() != 65.5) return "test2: ${test2()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/severalUsage.1.kt b/compiler/testData/codegen/boxInline/simple/severalUsage.1.kt deleted file mode 100644 index d5616fb96c9..00000000000 --- a/compiler/testData/codegen/boxInline/simple/severalUsage.1.kt +++ /dev/null @@ -1,7 +0,0 @@ -fun box(): String { - val result = runTest{minByTest { it }} - - if (result != 1) return "test1: ${result}" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/simple/severalUsage.2.kt b/compiler/testData/codegen/boxInline/simple/severalUsage.kt similarity index 51% rename from compiler/testData/codegen/boxInline/simple/severalUsage.2.kt rename to compiler/testData/codegen/boxInline/simple/severalUsage.kt index 2588f476460..754133dd75c 100644 --- a/compiler/testData/codegen/boxInline/simple/severalUsage.2.kt +++ b/compiler/testData/codegen/boxInline/simple/severalUsage.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + public inline fun runTest(f: () -> R): R { return f() } @@ -8,3 +10,12 @@ public inline fun minByTest(f: (Int) -> R): R { return v } +// FILE: 2.kt + +fun box(): String { + val result = runTest{minByTest { it }} + + if (result != 1) return "test1: ${result}" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/simple/simpleDouble.2.kt b/compiler/testData/codegen/boxInline/simple/simpleDouble.2.kt deleted file mode 100644 index cdd765e2fae..00000000000 --- a/compiler/testData/codegen/boxInline/simple/simpleDouble.2.kt +++ /dev/null @@ -1,23 +0,0 @@ -class InlineDouble(val res : Double) { - - inline fun foo(s : () -> Double) : Double { - val f = "fooStart" - val z = s() - return z - } - - inline fun foo11(s : (l: Double) -> Double) : Double { - return s(11.0) - } - - inline fun fooRes(s : (l: Double) -> Double) : Double { - val z = s(res) - return z - } - - inline fun fooRes2(s : (l: Double, t: Double) -> Double) : Double { - val f = "fooRes2Start" - val z = s(1.0, 11.0) - return z - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/simple/simpleDouble.1.kt b/compiler/testData/codegen/boxInline/simple/simpleDouble.kt similarity index 72% rename from compiler/testData/codegen/boxInline/simple/simpleDouble.1.kt rename to compiler/testData/codegen/boxInline/simple/simpleDouble.kt index 3a7126fa2b0..316cb18da5a 100644 --- a/compiler/testData/codegen/boxInline/simple/simpleDouble.1.kt +++ b/compiler/testData/codegen/boxInline/simple/simpleDouble.kt @@ -1,3 +1,31 @@ +// FILE: 1.kt + +class InlineDouble(val res : Double) { + + inline fun foo(s : () -> Double) : Double { + val f = "fooStart" + val z = s() + return z + } + + inline fun foo11(s : (l: Double) -> Double) : Double { + return s(11.0) + } + + inline fun fooRes(s : (l: Double) -> Double) : Double { + val z = s(res) + return z + } + + inline fun fooRes2(s : (l: Double, t: Double) -> Double) : Double { + val f = "fooRes2Start" + val z = s(1.0, 11.0) + return z + } +} + +// FILE: 2.kt + fun test0Param(): Double { val inlineX = InlineDouble(10.0) return inlineX.foo({ -> 1.0}) diff --git a/compiler/testData/codegen/boxInline/simple/simpleEnum.2.kt b/compiler/testData/codegen/boxInline/simple/simpleEnum.2.kt deleted file mode 100644 index 978cc0ad1c9..00000000000 --- a/compiler/testData/codegen/boxInline/simple/simpleEnum.2.kt +++ /dev/null @@ -1,10 +0,0 @@ -package test - -enum class MyEnum { - K; - - //TODO: KT-4693 - inline fun doSmth(a: T) : String { - return a.toString() + K.name - } -} diff --git a/compiler/testData/codegen/boxInline/simple/simpleEnum.1.kt b/compiler/testData/codegen/boxInline/simple/simpleEnum.kt similarity index 50% rename from compiler/testData/codegen/boxInline/simple/simpleEnum.1.kt rename to compiler/testData/codegen/boxInline/simple/simpleEnum.kt index c2cfb07fa66..2c775f9ea5a 100644 --- a/compiler/testData/codegen/boxInline/simple/simpleEnum.1.kt +++ b/compiler/testData/codegen/boxInline/simple/simpleEnum.kt @@ -1,3 +1,18 @@ +// FILE: 1.kt + +package test + +enum class MyEnum { + K; + + //TODO: KT-4693 + inline fun doSmth(a: T) : String { + return a.toString() + K.name + } +} + +// FILE: 2.kt + import test.* fun test1(): String { @@ -9,4 +24,4 @@ fun box(): String { if (result != "OK") return "fail1: ${result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/simpleGenerics.2.kt b/compiler/testData/codegen/boxInline/simple/simpleGenerics.2.kt deleted file mode 100644 index bfb4c576bf4..00000000000 --- a/compiler/testData/codegen/boxInline/simple/simpleGenerics.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun doSmth(a: T) : String { - return a.toString() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/simple/simpleGenerics.1.kt b/compiler/testData/codegen/boxInline/simple/simpleGenerics.kt similarity index 63% rename from compiler/testData/codegen/boxInline/simple/simpleGenerics.1.kt rename to compiler/testData/codegen/boxInline/simple/simpleGenerics.kt index ca3de1f3956..93a57927f0b 100644 --- a/compiler/testData/codegen/boxInline/simple/simpleGenerics.1.kt +++ b/compiler/testData/codegen/boxInline/simple/simpleGenerics.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun doSmth(a: T) : String { + return a.toString() +} + +// FILE: 2.kt + import test.* fun test1(s: Long): String { @@ -9,4 +19,4 @@ fun box(): String { if (result != "11") return "fail1: ${result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/simpleInt.2.kt b/compiler/testData/codegen/boxInline/simple/simpleInt.2.kt deleted file mode 100644 index d603e3a95a6..00000000000 --- a/compiler/testData/codegen/boxInline/simple/simpleInt.2.kt +++ /dev/null @@ -1,24 +0,0 @@ -class Inline(val res : Int) { - - inline fun foo(s : () -> Int) : Int { - val f = "fooStart" - val z = s() - return z - } - - inline fun foo11(s : (l: Int) -> Int) : Int { - return s(11) - } - - inline fun fooRes(s : (l: Int) -> Int) : Int { - val z = s(res) - return z - } - - inline fun fooRes2(s : (l: Int, t: Int) -> Int) : Int { - val f = "fooRes2Start" - val z = s(1, 11) - return z - } -} - diff --git a/compiler/testData/codegen/boxInline/simple/simpleInt.1.kt b/compiler/testData/codegen/boxInline/simple/simpleInt.kt similarity index 74% rename from compiler/testData/codegen/boxInline/simple/simpleInt.1.kt rename to compiler/testData/codegen/boxInline/simple/simpleInt.kt index 15a2051fc5a..19076887294 100644 --- a/compiler/testData/codegen/boxInline/simple/simpleInt.1.kt +++ b/compiler/testData/codegen/boxInline/simple/simpleInt.kt @@ -1,3 +1,31 @@ +// FILE: 1.kt + +class Inline(val res : Int) { + + inline fun foo(s : () -> Int) : Int { + val f = "fooStart" + val z = s() + return z + } + + inline fun foo11(s : (l: Int) -> Int) : Int { + return s(11) + } + + inline fun fooRes(s : (l: Int) -> Int) : Int { + val z = s(res) + return z + } + + inline fun fooRes2(s : (l: Int, t: Int) -> Int) : Int { + val f = "fooRes2Start" + val z = s(1, 11) + return z + } +} + +// FILE: 2.kt + fun test0Param(): Int { val inlineX = Inline(10) return inlineX.foo({ -> 1}) @@ -45,4 +73,4 @@ fun box(): String { if (test2Params() != 35) return "test2Params: ${test2Params()}" if (test2ParamsWithCaptured() != 19) return "test2ParamsWithCaptured: ${test2ParamsWithCaptured()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/simpleLambda.2.kt b/compiler/testData/codegen/boxInline/simple/simpleLambda.2.kt deleted file mode 100644 index dc9d31f6be5..00000000000 --- a/compiler/testData/codegen/boxInline/simple/simpleLambda.2.kt +++ /dev/null @@ -1,14 +0,0 @@ -package test - -public class Data() - -public inline fun T.use(block: (T)-> R) : R { - return block(this) -} - -public inline fun use2() : Int { - val s = 100 - return s -} - - diff --git a/compiler/testData/codegen/boxInline/simple/simpleLambda.1.kt b/compiler/testData/codegen/boxInline/simple/simpleLambda.kt similarity index 60% rename from compiler/testData/codegen/boxInline/simple/simpleLambda.1.kt rename to compiler/testData/codegen/boxInline/simple/simpleLambda.kt index 5faf5c6f9b6..f69146fa4ed 100644 --- a/compiler/testData/codegen/boxInline/simple/simpleLambda.1.kt +++ b/compiler/testData/codegen/boxInline/simple/simpleLambda.kt @@ -1,3 +1,20 @@ +// FILE: 1.kt + +package test + +public class Data() + +public inline fun T.use(block: (T)-> R) : R { + return block(this) +} + +public inline fun use2() : Int { + val s = 100 + return s +} + +// FILE: 2.kt + import test.* class Z {} diff --git a/compiler/testData/codegen/boxInline/simple/simpleObject.2.kt b/compiler/testData/codegen/boxInline/simple/simpleObject.2.kt deleted file mode 100644 index 7038676faf8..00000000000 --- a/compiler/testData/codegen/boxInline/simple/simpleObject.2.kt +++ /dev/null @@ -1,24 +0,0 @@ -class InlineString(val res : String) { - - inline fun foo(s : () -> String) : String { - val f = "fooStart" - val z = s() - return z - } - - inline fun foo11(s : (l: String) -> String) : String { - return s("11") - } - - inline fun fooRes(s : (l: String) -> String) : String { - val z = s(res) - return z - } - - inline fun fooRes2(s : (l: String, t: String) -> String) : String { - val f = "fooRes2Start" - val z = s("1", "11") - return z - } -} - diff --git a/compiler/testData/codegen/boxInline/simple/simpleObject.1.kt b/compiler/testData/codegen/boxInline/simple/simpleObject.kt similarity index 74% rename from compiler/testData/codegen/boxInline/simple/simpleObject.1.kt rename to compiler/testData/codegen/boxInline/simple/simpleObject.kt index 6e80ca46e7d..0ebf0496802 100644 --- a/compiler/testData/codegen/boxInline/simple/simpleObject.1.kt +++ b/compiler/testData/codegen/boxInline/simple/simpleObject.kt @@ -1,3 +1,31 @@ +// FILE: 1.kt + +class InlineString(val res : String) { + + inline fun foo(s : () -> String) : String { + val f = "fooStart" + val z = s() + return z + } + + inline fun foo11(s : (l: String) -> String) : String { + return s("11") + } + + inline fun fooRes(s : (l: String) -> String) : String { + val z = s(res) + return z + } + + inline fun fooRes2(s : (l: String, t: String) -> String) : String { + val f = "fooRes2Start" + val z = s("1", "11") + return z + } +} + +// FILE: 2.kt + fun test0Param(): String { val inlineX = InlineString("10") return inlineX.foo({ -> "1"}) @@ -46,4 +74,4 @@ fun box(): String { if (test2ParamsWithCaptured() != "91") return "test2ParamsWithCaptured: ${test2ParamsWithCaptured()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/vararg.2.kt b/compiler/testData/codegen/boxInline/simple/vararg.2.kt deleted file mode 100644 index af7c66d09f0..00000000000 --- a/compiler/testData/codegen/boxInline/simple/vararg.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun doSmth(vararg a: String) : String { - return a.foldRight("", { a, b -> a + b}) -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/simple/vararg.1.kt b/compiler/testData/codegen/boxInline/simple/vararg.kt similarity index 56% rename from compiler/testData/codegen/boxInline/simple/vararg.1.kt rename to compiler/testData/codegen/boxInline/simple/vararg.kt index 3262e38fe57..53d283ed97f 100644 --- a/compiler/testData/codegen/boxInline/simple/vararg.1.kt +++ b/compiler/testData/codegen/boxInline/simple/vararg.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun doSmth(vararg a: String) : String { + return a.foldRight("", { a, b -> a + b}) +} + +// FILE: 2.kt + import test.* fun test1(): String { @@ -9,4 +19,4 @@ fun box(): String { if (result != "OK") return "fail1: ${result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambda.2.kt b/compiler/testData/codegen/boxInline/smap/anonymous/lambda.2.kt deleted file mode 100644 index 38cff54876c..00000000000 --- a/compiler/testData/codegen/boxInline/smap/anonymous/lambda.2.kt +++ /dev/null @@ -1,18 +0,0 @@ -package builders - -inline fun call(crossinline init: () -> Unit) { - return { - init() - }() -} - -//SMAP -//lambda.2.kt -//Kotlin -//*S Kotlin -//*F -//+ 1 lambda.2.kt -//builders/Lambda_2Kt$call$1 -//*L -//1#1,18:1 -//*E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambda.1.kt b/compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt similarity index 65% rename from compiler/testData/codegen/boxInline/smap/anonymous/lambda.1.kt rename to compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt index 5f41c9798a3..f50c96357fd 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/lambda.1.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt @@ -1,3 +1,26 @@ +// FILE: 1.kt + +package builders + +inline fun call(crossinline init: () -> Unit) { + return { + init() + }() +} + +//SMAP +//lambda.2.kt +//Kotlin +//*S Kotlin +//*F +//+ 1 lambda.2.kt +//builders/Lambda_2Kt$call$1 +//*L +//1#1,18:1 +//*E + +// FILE: 2.kt + import builders.* @@ -43,4 +66,4 @@ fun box(): String { //*L //1#1,18:1 //8#2,2:19 -//*E \ No newline at end of file +//*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.2.kt b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.2.kt deleted file mode 100644 index 1263f8d7b8a..00000000000 --- a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package builders - -inline fun call(crossinline init: () -> Unit) { - return init() -} -//NO_CHECK_LAMBDA_INLINING -//SMAP ABSENT diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.1.kt b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt similarity index 69% rename from compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.1.kt rename to compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt index a8381ebfc38..f9572bc35f1 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.1.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package builders + +inline fun call(crossinline init: () -> Unit) { + return init() +} +//NO_CHECK_LAMBDA_INLINING +//SMAP ABSENT + +// FILE: 2.kt + import builders.* @@ -31,4 +43,4 @@ fun box(): String { //*L //1#1,34:1 //4#2:35 -//*E \ No newline at end of file +//*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.2.kt b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.2.kt deleted file mode 100644 index e030aa9dc9d..00000000000 --- a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package builders - -inline fun call(crossinline init: () -> Unit) { - return init() -} - -//SMAP ABSENT diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.1.kt b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt similarity index 85% rename from compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.1.kt rename to compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt index 26356840449..f77e688f7da 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.1.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package builders + +inline fun call(crossinline init: () -> Unit) { + return init() +} + +//SMAP ABSENT + +// FILE: 2.kt + import builders.* @@ -53,4 +65,4 @@ fun box(): String { //LambdaOnInlineCallSite_1Kt$test$1$1 //*L //1#1,56:1 -//*E \ No newline at end of file +//*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/object.2.kt b/compiler/testData/codegen/boxInline/smap/anonymous/object.2.kt deleted file mode 100644 index 6dc84b45b68..00000000000 --- a/compiler/testData/codegen/boxInline/smap/anonymous/object.2.kt +++ /dev/null @@ -1,21 +0,0 @@ -package builders - -inline fun call(crossinline init: () -> Unit) { - return object { - fun run () { - init() - } - }.run() -} - - -//SMAP -//object.2.kt -//Kotlin -//*S Kotlin -//*F -//+ 1 object.2.kt -//builders/Object_2Kt$call$1 -//*L -//1#1,21:1 -//*E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/object.1.kt b/compiler/testData/codegen/boxInline/smap/anonymous/object.kt similarity index 61% rename from compiler/testData/codegen/boxInline/smap/anonymous/object.1.kt rename to compiler/testData/codegen/boxInline/smap/anonymous/object.kt index 02cc8575470..a93a8fe2f42 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/object.1.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/object.kt @@ -1,3 +1,29 @@ +// FILE: 1.kt + +package builders + +inline fun call(crossinline init: () -> Unit) { + return object { + fun run () { + init() + } + }.run() +} + + +//SMAP +//object.2.kt +//Kotlin +//*S Kotlin +//*F +//+ 1 object.2.kt +//builders/Object_2Kt$call$1 +//*L +//1#1,21:1 +//*E + +// FILE: 2.kt + import builders.* @@ -42,4 +68,4 @@ fun box(): String { //*L //1#1,21:1 //8#2,2:22 -//*E \ No newline at end of file +//*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.2.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.2.kt deleted file mode 100644 index e030aa9dc9d..00000000000 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package builders - -inline fun call(crossinline init: () -> Unit) { - return init() -} - -//SMAP ABSENT diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.1.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt similarity index 77% rename from compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.1.kt rename to compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt index e8e9c7c4f60..fa441235977 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.1.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package builders + +inline fun call(crossinline init: () -> Unit) { + return init() +} + +//SMAP ABSENT + +// FILE: 2.kt + import builders.* @@ -33,4 +45,4 @@ fun box(): String { //*L //1#1,36:1 //4#2:37 -//*E \ No newline at end of file +//*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.2.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.2.kt deleted file mode 100644 index 78929fcc5cd..00000000000 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package builders - -inline fun call(crossinline init: () -> Unit) { - return init() -} - -//SMAP ABSENT \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.1.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt similarity index 85% rename from compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.1.kt rename to compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt index 794e24c4542..a4f558c93de 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.1.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package builders + +inline fun call(crossinline init: () -> Unit) { + return init() +} + +//SMAP ABSENT + +// FILE: 2.kt + import builders.* @@ -55,4 +67,4 @@ fun box(): String { //ObjectOnInlineCallSite_1Kt$test$1$1 //*L //1#1,58:1 -//*E \ No newline at end of file +//*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.1.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.1.kt deleted file mode 100644 index 7e74a4368c2..00000000000 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.1.kt +++ /dev/null @@ -1,32 +0,0 @@ -import builders.* - - -fun box(): String { - return test() -} -//NO_CHECK_LAMBDA_INLINING - -//SXMAP -//objectOnInlineCallSite2.1.kt -//Kotlin -//*S Kotlin -//*F -//+ 1 objectOnInlineCallSite2.1.kt -//_DefaultPackage -//+ 2 objectOnInlineCallSite2.2.kt -//builders/BuildersPackage -//*L -//1#1,32:1 -//8#2,11:33 -//*E -// -//SXMAP -//objectOnInlineCallSite2.2.kt -//Kotlin -//*S Kotlin -//*F -//+ 1 objectOnInlineCallSite2.2.kt -//builders/BuildersPackage$objectOnInlineCallSite2_2$HASH$test$1$1 -//*L -//1#1,42:1 -//*E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.2.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt similarity index 54% rename from compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.2.kt rename to compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt index a81c464b612..3908f172187 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.2.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package builders inline fun call(crossinline init: () -> Unit) { @@ -39,4 +41,39 @@ inline fun test(): String { //builders/BuildersPackage$objectOnInlineCallSite2_2$HASH$test$1$1 //*L //1#1,42:1 -//*E \ No newline at end of file +//*E + +// FILE: 2.kt + +import builders.* + + +fun box(): String { + return test() +} +//NO_CHECK_LAMBDA_INLINING + +//SXMAP +//objectOnInlineCallSite2.1.kt +//Kotlin +//*S Kotlin +//*F +//+ 1 objectOnInlineCallSite2.1.kt +//_DefaultPackage +//+ 2 objectOnInlineCallSite2.2.kt +//builders/BuildersPackage +//*L +//1#1,32:1 +//8#2,11:33 +//*E +// +//SXMAP +//objectOnInlineCallSite2.2.kt +//Kotlin +//*S Kotlin +//*F +//+ 1 objectOnInlineCallSite2.2.kt +//builders/BuildersPackage$objectOnInlineCallSite2_2$HASH$test$1$1 +//*L +//1#1,42:1 +//*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.1.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.1.kt deleted file mode 100644 index f1ce619c597..00000000000 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.1.kt +++ /dev/null @@ -1,9 +0,0 @@ -import builders.* - - -fun box(): String { - return test{"OK"} -} -//NO_CHECK_LAMBDA_INLINING - -//TODO \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.2.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt similarity index 75% rename from compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.2.kt rename to compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt index e961e757080..14e7104860c 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.2.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package builders //TODO there is a bug in asm it's skips linenumber on same line on reading bytecode inline fun call(crossinline init: () -> Unit) { @@ -19,3 +21,14 @@ inline fun test(crossinline p: () -> String): String { } //TODO SHOULD BE LESS +// FILE: 2.kt + +import builders.* + + +fun box(): String { + return test{"OK"} +} +//NO_CHECK_LAMBDA_INLINING + +//TODO diff --git a/compiler/testData/codegen/boxInline/smap/assertion.1.kt b/compiler/testData/codegen/boxInline/smap/assertion.1.kt deleted file mode 100644 index ff857ffd07a..00000000000 --- a/compiler/testData/codegen/boxInline/smap/assertion.1.kt +++ /dev/null @@ -1,25 +0,0 @@ -import test.* - -fun box(): String { - massert(true) - massert(true) { - "test" - } - - return "OK" -} - -//SMAP -//assertion.1.kt -//Kotlin -//*S Kotlin -//*F -//+ 1 assertion.1.kt -//Assertion_1Kt -//+ 2 assertion.2.kt -//test/Assertion_2Kt -//*L -//1#1,25:1 -//15#2,7:26 -//6#2,7:33 -//*E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/assertion.2.kt b/compiler/testData/codegen/boxInline/smap/assertion.kt similarity index 60% rename from compiler/testData/codegen/boxInline/smap/assertion.2.kt rename to compiler/testData/codegen/boxInline/smap/assertion.kt index 2bec83a1ecf..4f0053ead18 100644 --- a/compiler/testData/codegen/boxInline/smap/assertion.2.kt +++ b/compiler/testData/codegen/boxInline/smap/assertion.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test public val MASSERTIONS_ENABLED: Boolean = true @@ -21,3 +23,31 @@ public inline fun massert(value: Boolean, message: Any = "Assertion failed") { } //SMAP ABSENT + +// FILE: 2.kt + +import test.* + +fun box(): String { + massert(true) + massert(true) { + "test" + } + + return "OK" +} + +//SMAP +//assertion.1.kt +//Kotlin +//*S Kotlin +//*F +//+ 1 assertion.1.kt +//Assertion_1Kt +//+ 2 assertion.2.kt +//test/Assertion_2Kt +//*L +//1#1,25:1 +//15#2,7:26 +//6#2,7:33 +//*E diff --git a/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.2.kt b/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.2.kt deleted file mode 100644 index 9fe0bdf7cb9..00000000000 --- a/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.2.kt +++ /dev/null @@ -1,3 +0,0 @@ -class A { - inline fun foo() {} -} diff --git a/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.1.kt b/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt similarity index 78% rename from compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.1.kt rename to compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt index b63ae10a719..2e8df6318e0 100644 --- a/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.1.kt +++ b/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt @@ -1,3 +1,11 @@ +// FILE: 1.kt + +class A { + inline fun foo() {} +} + +// FILE: 2.kt + fun box(): String { A().foo() diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.2.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.2.kt deleted file mode 100644 index d99c37ca857..00000000000 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.2.kt +++ /dev/null @@ -1,4 +0,0 @@ -package test -inline fun stub() { - -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.1.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt similarity index 66% rename from compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.1.kt rename to compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt index c481e978f5e..8342e7ebaef 100644 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.1.kt +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt @@ -1,3 +1,12 @@ +// FILE: 1.kt + +package test +inline fun stub() { + +} + +// FILE: 2.kt + fun box(): String { return "KO".reversed() } @@ -11,4 +20,4 @@ fun box(): String { //NoSmap_1Kt //*L //1#1,14:1 -//*E \ No newline at end of file +//*E diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.2.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.2.kt deleted file mode 100644 index a695d4662f5..00000000000 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.2.kt +++ /dev/null @@ -1,3 +0,0 @@ -package test - -inline fun className() = T::class.simpleName \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.1.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt similarity index 71% rename from compiler/testData/codegen/boxInline/smap/inlineOnly/reified.1.kt rename to compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt index 45e90aec445..b61b1bdc77b 100644 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.1.kt +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt @@ -1,3 +1,11 @@ +// FILE: 1.kt + +package test + +inline fun className() = T::class.simpleName + +// FILE: 2.kt + import test.* fun box(): String { @@ -19,4 +27,4 @@ fun box(): String { //*L //1#1,22:1 //3#2:23 -//*E \ No newline at end of file +//*E diff --git a/compiler/testData/codegen/boxInline/smap/oneFile.2.kt b/compiler/testData/codegen/boxInline/smap/oneFile.2.kt deleted file mode 100644 index 4914054dcb2..00000000000 --- a/compiler/testData/codegen/boxInline/smap/oneFile.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package zzz - -inline fun nothing() {} - -//SMAP ABSENT \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/oneFile.1.kt b/compiler/testData/codegen/boxInline/smap/oneFile.kt similarity index 75% rename from compiler/testData/codegen/boxInline/smap/oneFile.1.kt rename to compiler/testData/codegen/boxInline/smap/oneFile.kt index 13d2f3226f9..43e125b1681 100644 --- a/compiler/testData/codegen/boxInline/smap/oneFile.1.kt +++ b/compiler/testData/codegen/boxInline/smap/oneFile.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package zzz + +inline fun nothing() {} + +//SMAP ABSENT + +// FILE: 2.kt + fun box(): String { return test { "K" @@ -19,4 +29,4 @@ inline fun test(p: () -> String): String { //OneFile_1Kt //*L //1#1,22:1 -//*E \ No newline at end of file +//*E diff --git a/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.2.kt b/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.2.kt deleted file mode 100644 index 7cdd760921b..00000000000 --- a/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.2.kt +++ /dev/null @@ -1,9 +0,0 @@ -package zzz - -public class A(val a: Int, val b: Int) - -operator inline fun A.component1() = a - -operator inline fun A.component2() = b - -//SMAP ABSENT \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.1.kt b/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt similarity index 62% rename from compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.1.kt rename to compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt index dca754ba80d..5d9b698b707 100644 --- a/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.1.kt +++ b/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt @@ -1,3 +1,17 @@ +// FILE: 1.kt + +package zzz + +public class A(val a: Int, val b: Int) + +operator inline fun A.component1() = a + +operator inline fun A.component2() = b + +//SMAP ABSENT + +// FILE: 2.kt + import zzz.* fun box(): String { @@ -18,4 +32,4 @@ fun box(): String { //*L //1#1,21:1 //5#2,3:22 -//*E \ No newline at end of file +//*E diff --git a/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.2.kt b/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.2.kt deleted file mode 100644 index 8c86c7b6f9e..00000000000 --- a/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package zzz - -public class A(val p: Int) - -operator inline fun A.iterator() = (1..p).iterator() - -//SMAP ABSENT \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.1.kt b/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt similarity index 68% rename from compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.1.kt rename to compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt index b28508d7966..4454915ce19 100644 --- a/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.1.kt +++ b/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package zzz + +public class A(val p: Int) + +operator inline fun A.iterator() = (1..p).iterator() + +//SMAP ABSENT + +// FILE: 2.kt + import zzz.* fun box(): String { @@ -21,4 +33,4 @@ fun box(): String { //*L //1#1,24:1 //5#2:25 -//*E \ No newline at end of file +//*E diff --git a/compiler/testData/codegen/boxInline/smap/smap.1.kt b/compiler/testData/codegen/boxInline/smap/smap.1.kt deleted file mode 100644 index 1ae6077c22c..00000000000 --- a/compiler/testData/codegen/boxInline/smap/smap.1.kt +++ /dev/null @@ -1,38 +0,0 @@ -import builders.* - - -inline fun test(): String { - var res = "Fail" - - html { - head { - res = "OK" - } - } - - return res -} - - -fun box(): String { - var expected = test(); - - return expected -} - -//SMAP -//smap.1.kt -//Kotlin -//*S Kotlin -//*F -//+ 1 smap.1.kt -//Smap_1Kt -//+ 2 smap.2.kt -//builders/Smap_2Kt -//*L -//1#1,38:1 -//16#2:39 -//4#2,9:40 -//8#2,3:49 -//5#2:52 -//*E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/smap.2.kt b/compiler/testData/codegen/boxInline/smap/smap.kt similarity index 55% rename from compiler/testData/codegen/boxInline/smap/smap.2.kt rename to compiler/testData/codegen/boxInline/smap/smap.kt index 891aef3d0b2..c9fe719c601 100644 --- a/compiler/testData/codegen/boxInline/smap/smap.2.kt +++ b/compiler/testData/codegen/boxInline/smap/smap.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package builders inline fun init(init: () -> Unit) { @@ -25,4 +27,45 @@ inline fun html(init: () -> Unit) { //builders/Smap_2Kt //*L //1#1,28:1 -//*E \ No newline at end of file +//*E + +// FILE: 2.kt + +import builders.* + + +inline fun test(): String { + var res = "Fail" + + html { + head { + res = "OK" + } + } + + return res +} + + +fun box(): String { + var expected = test(); + + return expected +} + +//SMAP +//smap.1.kt +//Kotlin +//*S Kotlin +//*F +//+ 1 smap.1.kt +//Smap_1Kt +//+ 2 smap.2.kt +//builders/Smap_2Kt +//*L +//1#1,38:1 +//16#2:39 +//4#2,9:40 +//8#2,3:49 +//5#2:52 +//*E diff --git a/compiler/testData/codegen/boxInline/special/identityCheck.2.kt b/compiler/testData/codegen/boxInline/special/identityCheck.2.kt deleted file mode 100644 index 5ed53bc483a..00000000000 --- a/compiler/testData/codegen/boxInline/special/identityCheck.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun doSmth(a: T) : Boolean { - return a === a -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/special/identityCheck.1.kt b/compiler/testData/codegen/boxInline/special/identityCheck.kt similarity index 80% rename from compiler/testData/codegen/boxInline/special/identityCheck.1.kt rename to compiler/testData/codegen/boxInline/special/identityCheck.kt index 52de1c3c444..ae0a46df1d3 100644 --- a/compiler/testData/codegen/boxInline/special/identityCheck.1.kt +++ b/compiler/testData/codegen/boxInline/special/identityCheck.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun doSmth(a: T) : Boolean { + return a === a +} + +// FILE: 2.kt + import test.* fun test1(s: Long): Boolean { @@ -20,4 +30,4 @@ fun box(): String { if (!test3(11111.3)) return "fail 3.3" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/special/ifBranches.2.kt b/compiler/testData/codegen/boxInline/special/ifBranches.2.kt deleted file mode 100644 index df854b96662..00000000000 --- a/compiler/testData/codegen/boxInline/special/ifBranches.2.kt +++ /dev/null @@ -1,25 +0,0 @@ -package test - -inline fun runIf(f: (T) -> T, start: T, stop: T, secondStart: T) : T { - if (f(start) == stop) { - return f(start) - } - return f(secondStart) -} - - -inline fun runIf2(f: (T) -> T, start: T, stop: T, secondStart: T) : T { - val result = f(start) - if (result == stop) { - return result - } - return f(secondStart) -} - -inline fun runIfElse(f: (T) -> T, start: T, stop: T, secondStart: T) : T { - if (f(start) == stop) { - return f(start) - } else { - return f(secondStart) - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/special/ifBranches.1.kt b/compiler/testData/codegen/boxInline/special/ifBranches.kt similarity index 70% rename from compiler/testData/codegen/boxInline/special/ifBranches.1.kt rename to compiler/testData/codegen/boxInline/special/ifBranches.kt index 5db8c03ec61..6deb024f053 100644 --- a/compiler/testData/codegen/boxInline/special/ifBranches.1.kt +++ b/compiler/testData/codegen/boxInline/special/ifBranches.kt @@ -1,3 +1,33 @@ +// FILE: 1.kt + +package test + +inline fun runIf(f: (T) -> T, start: T, stop: T, secondStart: T) : T { + if (f(start) == stop) { + return f(start) + } + return f(secondStart) +} + + +inline fun runIf2(f: (T) -> T, start: T, stop: T, secondStart: T) : T { + val result = f(start) + if (result == stop) { + return result + } + return f(secondStart) +} + +inline fun runIfElse(f: (T) -> T, start: T, stop: T, secondStart: T) : T { + if (f(start) == stop) { + return f(start) + } else { + return f(secondStart) + } +} + +// FILE: 2.kt + import test.* fun testIf(): String { @@ -40,4 +70,4 @@ fun box(): String { if (result != "OK") return "fail2: ${result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/special/iinc.2.kt b/compiler/testData/codegen/boxInline/special/iinc.2.kt deleted file mode 100644 index 6c610eff998..00000000000 --- a/compiler/testData/codegen/boxInline/special/iinc.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -public inline fun Int.times2(body : () -> Unit) { - var count = this; - while (count > 0) { - body() - count-- - } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/special/iinc.1.kt b/compiler/testData/codegen/boxInline/special/iinc.kt similarity index 50% rename from compiler/testData/codegen/boxInline/special/iinc.1.kt rename to compiler/testData/codegen/boxInline/special/iinc.kt index fb46f17e338..9df58ac0af5 100644 --- a/compiler/testData/codegen/boxInline/special/iinc.1.kt +++ b/compiler/testData/codegen/boxInline/special/iinc.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +public inline fun Int.times2(body : () -> Unit) { + var count = this; + while (count > 0) { + body() + count-- + } +} + +// FILE: 2.kt + fun test1(): Int { var s = 0; 2.times2 { @@ -10,4 +22,4 @@ fun box(): String { if (test1() != 2) return "test1: ${test1()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/special/inlineChain.1.kt b/compiler/testData/codegen/boxInline/special/inlineChain.1.kt deleted file mode 100644 index 4b53b0054c9..00000000000 --- a/compiler/testData/codegen/boxInline/special/inlineChain.1.kt +++ /dev/null @@ -1,18 +0,0 @@ -fun test1(): String { - val inlineX = My() - var d = ""; - inlineX.doWork({ z: String -> d = z; z}) - return d -} - -fun test2(): Int { - val inlineX = My() - return inlineX.perform({ z: My -> 11}) -} - -fun box(): String { - if (test1() != "OK") return "test1: ${test1()}" - if (test2() != 11) return "test1: ${test2()}" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/special/inlineChain.2.kt b/compiler/testData/codegen/boxInline/special/inlineChain.2.kt deleted file mode 100644 index 180494efaa9..00000000000 --- a/compiler/testData/codegen/boxInline/special/inlineChain.2.kt +++ /dev/null @@ -1,20 +0,0 @@ -class My - -inline fun T.perform(job: (T)-> R) : R { - return job(this) -} - - -inline fun My.someWork(job: (String) -> Any): Unit { - this.perform { - job("OK") - } -} - -inline fun My.doWork (closure : (param : String) -> Unit) : Unit { - this.someWork(closure) -} - -inline fun My.doPerform (closure : (param : My) -> Int) : Int { - return perform(closure) -} diff --git a/compiler/testData/codegen/boxInline/special/inlineChain.kt b/compiler/testData/codegen/boxInline/special/inlineChain.kt new file mode 100644 index 00000000000..9c24a59c100 --- /dev/null +++ b/compiler/testData/codegen/boxInline/special/inlineChain.kt @@ -0,0 +1,43 @@ +// FILE: 1.kt + +class My + +inline fun T.perform(job: (T)-> R) : R { + return job(this) +} + + +inline fun My.someWork(job: (String) -> Any): Unit { + this.perform { + job("OK") + } +} + +inline fun My.doWork (closure : (param : String) -> Unit) : Unit { + this.someWork(closure) +} + +inline fun My.doPerform (closure : (param : My) -> Int) : Int { + return perform(closure) +} + +// FILE: 2.kt + +fun test1(): String { + val inlineX = My() + var d = ""; + inlineX.doWork({ z: String -> d = z; z}) + return d +} + +fun test2(): Int { + val inlineX = My() + return inlineX.perform({ z: My -> 11}) +} + +fun box(): String { + if (test1() != "OK") return "test1: ${test1()}" + if (test2() != 11) return "test1: ${test2()}" + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/special/plusAssign.2.kt b/compiler/testData/codegen/boxInline/special/plusAssign.2.kt deleted file mode 100644 index 2502da33fb1..00000000000 --- a/compiler/testData/codegen/boxInline/special/plusAssign.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -public class Z(public var s: Int) - -operator inline fun Z.plusAssign(lambda: () -> Int) { - this.s += lambda() -} diff --git a/compiler/testData/codegen/boxInline/special/plusAssign.1.kt b/compiler/testData/codegen/boxInline/special/plusAssign.kt similarity index 55% rename from compiler/testData/codegen/boxInline/special/plusAssign.1.kt rename to compiler/testData/codegen/boxInline/special/plusAssign.kt index 3d37d0baa6d..840e4ae2958 100644 --- a/compiler/testData/codegen/boxInline/special/plusAssign.1.kt +++ b/compiler/testData/codegen/boxInline/special/plusAssign.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +package test + +public class Z(public var s: Int) + +operator inline fun Z.plusAssign(lambda: () -> Int) { + this.s += lambda() +} + +// FILE: 2.kt + import test.* fun test1(s: Int): Int { @@ -11,4 +23,4 @@ fun box(): String { if (result != 22) return "fail1: ${result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/special/stackHeightBug.1.kt b/compiler/testData/codegen/boxInline/special/stackHeightBug.1.kt deleted file mode 100644 index 8c191bf5e98..00000000000 --- a/compiler/testData/codegen/boxInline/special/stackHeightBug.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -import test.* - -fun box(): String { - mfun{ "".toLowerCase2() } - return "OK" -} diff --git a/compiler/testData/codegen/boxInline/special/stackHeightBug.2.kt b/compiler/testData/codegen/boxInline/special/stackHeightBug.2.kt deleted file mode 100644 index d23cea583c3..00000000000 --- a/compiler/testData/codegen/boxInline/special/stackHeightBug.2.kt +++ /dev/null @@ -1,8 +0,0 @@ -package test - -inline fun mfun(f: () -> R) { - f() - f() -} - -public inline fun String.toLowerCase2() : String = "" \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/special/stackHeightBug.kt b/compiler/testData/codegen/boxInline/special/stackHeightBug.kt new file mode 100644 index 00000000000..21de6838e34 --- /dev/null +++ b/compiler/testData/codegen/boxInline/special/stackHeightBug.kt @@ -0,0 +1,19 @@ +// FILE: 1.kt + +package test + +inline fun mfun(f: () -> R) { + f() + f() +} + +public inline fun String.toLowerCase2() : String = "" + +// FILE: 2.kt + +import test.* + +fun box(): String { + mfun{ "".toLowerCase2() } + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/constField.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/constField.2.kt deleted file mode 100644 index f98efdc9f97..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/constField.2.kt +++ /dev/null @@ -1,11 +0,0 @@ -package test - -private const val packageProp = "O" - -internal inline fun packageInline(p: (String) -> String): String { - return p(packageProp) -} - -internal fun samePackageCall(): String { - return packageInline { it + "K"} -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/constField.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt similarity index 55% rename from compiler/testData/codegen/boxInline/syntheticAccessors/constField.1.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt index a766a08464a..7900725284c 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/constField.1.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt @@ -1,3 +1,19 @@ +// FILE: 1.kt + +package test + +private const val packageProp = "O" + +internal inline fun packageInline(p: (String) -> String): String { + return p(packageProp) +} + +internal fun samePackageCall(): String { + return packageInline { it + "K"} +} + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.2.kt deleted file mode 100644 index fb63bc65db0..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.2.kt +++ /dev/null @@ -1,13 +0,0 @@ -package test - -private val packageProp = "O" - -private fun packageFun() = "K" - -internal inline fun packageInline(p: (String, String) -> String): String { - return p(packageProp, packageFun()) -} - -internal fun samePackageCall(): String { - return packageInline { s, s2 -> s + s2 } -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt similarity index 50% rename from compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.1.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt index 18148f951dc..30bef9d6bc8 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.1.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt @@ -1,3 +1,21 @@ +// FILE: 1.kt + +package test + +private val packageProp = "O" + +private fun packageFun() = "K" + +internal inline fun packageInline(p: (String, String) -> String): String { + return p(packageProp, packageFun()) +} + +internal fun samePackageCall(): String { + return packageInline { s, s2 -> s + s2 } +} + +// FILE: 2.kt + import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.1.kt deleted file mode 100644 index 304f6cb3502..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.1.kt +++ /dev/null @@ -1,10 +0,0 @@ -import test.* - -fun box() : String { - val p = P() - - if (p.testPrivate() != "OK") return "fail 1 ${p.testPrivate()}" - - if (p.testFinal() != "OK") return "fail 2 ${p.testFinal()}" - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt similarity index 61% rename from compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.2.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt index f66496a0b13..a389f36bb3c 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.2.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test class P { @@ -20,4 +22,17 @@ class P { fun testFinal(): String { return fooFinal() } -} \ No newline at end of file +} + +// FILE: 2.kt + +import test.* + +fun box() : String { + val p = P() + + if (p.testPrivate() != "OK") return "fail 1 ${p.testPrivate()}" + + if (p.testFinal() != "OK") return "fail 2 ${p.testFinal()}" + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.1.kt deleted file mode 100644 index 796d276d2c6..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.1.kt +++ /dev/null @@ -1,15 +0,0 @@ -import test.* - -class A: P() { - override val FOO: String - get() = "fail" - - override fun test(): String { - return "fail" - } -} - -fun box() : String { - val p = P() - return p.protectedProp() + p.protectedFun() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.2.kt deleted file mode 100644 index d446994d72f..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.2.kt +++ /dev/null @@ -1,16 +0,0 @@ -package test - -open class P { - protected open val FOO = "O" - - protected open fun test() = "K" - - inline fun protectedProp(): String { - return FOO - } - - inline fun protectedFun(): String { - return test() - } -} - diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt new file mode 100644 index 00000000000..21bcb3291ee --- /dev/null +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt @@ -0,0 +1,35 @@ +// FILE: 1.kt + +package test + +open class P { + protected open val FOO = "O" + + protected open fun test() = "K" + + inline fun protectedProp(): String { + return FOO + } + + inline fun protectedFun(): String { + return test() + } +} + +// FILE: 2.kt + +import test.* + +class A: P() { + override val FOO: String + get() = "fail" + + override fun test(): String { + return "fail" + } +} + +fun box() : String { + val p = P() + return p.protectedProp() + p.protectedFun() +} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.1.kt deleted file mode 100644 index 796d276d2c6..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.1.kt +++ /dev/null @@ -1,15 +0,0 @@ -import test.* - -class A: P() { - override val FOO: String - get() = "fail" - - override fun test(): String { - return "fail" - } -} - -fun box() : String { - val p = P() - return p.protectedProp() + p.protectedFun() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt similarity index 50% rename from compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.2.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt index 31d5b865209..93daa050549 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.2.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test open class Base { @@ -17,3 +19,20 @@ open class P : Base() { } } +// FILE: 2.kt + +import test.* + +class A: P() { + override val FOO: String + get() = "fail" + + override fun test(): String { + return "fail" + } +} + +fun box() : String { + val p = P() + return p.protectedProp() + p.protectedFun() +} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/superCall.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/superCall.1.kt deleted file mode 100644 index 44796bf6352..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/superCall.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return X.doTest() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/superCall.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt similarity index 69% rename from compiler/testData/codegen/boxInline/syntheticAccessors/superCall.2.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt index 2328e976ce4..98cf3d927ed 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/superCall.2.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test open class A { @@ -13,3 +15,11 @@ object X : A() { return super.test() } } + +// FILE: 2.kt + +import test.* + +fun box(): String { + return X.doTest() +} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.1.kt deleted file mode 100644 index 44796bf6352..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.1.kt +++ /dev/null @@ -1,5 +0,0 @@ -import test.* - -fun box(): String { - return X.doTest() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt similarity index 68% rename from compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.2.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt index 8a3a94c67cf..e5f900da71e 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.2.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + package test open class A { @@ -12,3 +14,11 @@ object X : A() { return super.test } } + +// FILE: 2.kt + +import test.* + +fun box(): String { + return X.doTest() +} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.2.kt deleted file mode 100644 index 4409ed776a1..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun call(s: () -> String): String { - return s() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt similarity index 79% rename from compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.1.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt index d5e56940322..1650f38adf4 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.1.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun call(s: () -> String): String { + return s() +} + +// FILE: 2.kt + import test.* class A { @@ -22,4 +32,4 @@ fun box(): String { val a = A() if (a.test1() != "OK") return "fail 1: ${a.test1()}" return a.test2() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.2.kt deleted file mode 100644 index 8c459c68a29..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun call(crossinline s: () -> String): String { - return { s() } () -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt similarity index 77% rename from compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.1.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt index 0004e30d150..ff03266a302 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.1.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt @@ -1,3 +1,13 @@ +// FILE: 1.kt + +package test + +inline fun call(crossinline s: () -> String): String { + return { s() } () +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -23,4 +33,4 @@ fun box(): String { val a = A() if (a.test1() != "OK") return "fail 1: ${a.test1()}" return a.test2() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.2.kt deleted file mode 100644 index 4409ed776a1..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.2.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -inline fun call(s: () -> String): String { - return s() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt similarity index 79% rename from compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.1.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt index 193c20681e1..b5a5f5fce47 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.1.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt @@ -1,4 +1,13 @@ -//NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt + +package test + +inline fun call(s: () -> String): String { + return s() +} + +// FILE: 2.kt + import test.* class A { @@ -26,4 +35,4 @@ fun box(): String { val a = A() if (a.test1() != "OK") return "fail 1: ${a.test1()}" return a.test2() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.2.kt deleted file mode 100644 index 49bfcde205e..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -inline fun call(crossinline s: () -> String): String { - return { - s() - }() -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt similarity index 72% rename from compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.1.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt index 6f2859af978..4bf507eea06 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.1.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt @@ -1,3 +1,16 @@ +// FILE: 1.kt + +package test + +inline fun call(crossinline s: () -> String): String { + return { + s() + }() +} + +// FILE: 2.kt + +//NO_CHECK_LAMBDA_INLINING import test.* class A { @@ -25,4 +38,4 @@ fun box(): String { val a = A() if (a.test1() != "OK") return "fail 1: ${a.test1()}" return a.test2() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.2.kt deleted file mode 100644 index ece932aa21f..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.2.kt +++ /dev/null @@ -1,12 +0,0 @@ -package test - -inline fun call(s: () -> String): String { - return s() -} - -open class Base { - - protected open fun method(): String = "O" - - protected open val prop = "K" -} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt similarity index 69% rename from compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.1.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt index c4ae608d605..6d8aca2ae52 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.1.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt @@ -1,3 +1,20 @@ +// FILE: 1.kt + +package test + +inline fun call(s: () -> String): String { + return s() +} + +open class Base { + + protected open fun method(): String = "O" + + protected open val prop = "K" +} + +// FILE: 2.kt + import test.* class A : Base() { @@ -25,4 +42,4 @@ fun box(): String { val a = A() if (a.test1() != "OK") return "fail 1: ${a.test1()}" return a.test2() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.2.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.2.kt deleted file mode 100644 index d95a1adacc5..00000000000 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.2.kt +++ /dev/null @@ -1,14 +0,0 @@ -package test - -inline fun call(crossinline s: () -> String): String { - return { - s() - }() -} - -open class Base { - - protected open fun method(): String = "O" - - protected open val prop = "K" -} diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.1.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt similarity index 67% rename from compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.1.kt rename to compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt index 32f4b2e2c35..4c5559410c1 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.1.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt @@ -1,3 +1,22 @@ +// FILE: 1.kt + +package test + +inline fun call(crossinline s: () -> String): String { + return { + s() + }() +} + +open class Base { + + protected open fun method(): String = "O" + + protected open val prop = "K" +} + +// FILE: 2.kt + //NO_CHECK_LAMBDA_INLINING import test.* @@ -26,4 +45,4 @@ fun box(): String { val a = A() if (a.test1() != "OK") return "fail 1: ${a.test1()}" return a.test2() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/trait/trait.2.kt b/compiler/testData/codegen/boxInline/trait/trait.2.kt deleted file mode 100644 index 98660fcd4c1..00000000000 --- a/compiler/testData/codegen/boxInline/trait/trait.2.kt +++ /dev/null @@ -1,18 +0,0 @@ -package test - -interface InlineTrait { - - fun finalInline(s: () -> String): String { - return s() - } - - companion object { - inline final fun finalInline(s: () -> String): String { - return s() - } - } -} - -class Z: InlineTrait { - -} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/trait/trait.1.kt b/compiler/testData/codegen/boxInline/trait/trait.kt similarity index 64% rename from compiler/testData/codegen/boxInline/trait/trait.1.kt rename to compiler/testData/codegen/boxInline/trait/trait.kt index 3729daa69e0..c44a59048cd 100644 --- a/compiler/testData/codegen/boxInline/trait/trait.1.kt +++ b/compiler/testData/codegen/boxInline/trait/trait.kt @@ -1,3 +1,26 @@ +// FILE: 1.kt + +package test + +interface InlineTrait { + + fun finalInline(s: () -> String): String { + return s() + } + + companion object { + inline final fun finalInline(s: () -> String): String { + return s() + } + } +} + +class Z: InlineTrait { + +} + +// FILE: 2.kt + import test.* fun testFinalInline(): String { @@ -18,4 +41,4 @@ fun box(): String { if (testClassObject() != "classobject") return "test3: ${testClassObject()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.1.kt b/compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.1.kt deleted file mode 100644 index 0e32fe8b179..00000000000 --- a/compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.1.kt +++ /dev/null @@ -1,6 +0,0 @@ -inline fun test2Inline() = performWithFinally { "OK" } - -fun box(): String { - return test2Inline() -} - diff --git a/compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.2.kt b/compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt similarity index 62% rename from compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.2.kt rename to compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt index d172192f052..93c27ff3be7 100644 --- a/compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.2.kt +++ b/compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt @@ -1,3 +1,5 @@ +// FILE: 1.kt + inline fun performWithFinally(finally: () -> R) : R { try { throw RuntimeException("1") @@ -7,3 +9,11 @@ inline fun performWithFinally(finally: () -> R) : R { return finally() } } + +// FILE: 2.kt + +inline fun test2Inline() = performWithFinally { "OK" } + +fun box(): String { + return test2Inline() +} diff --git a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.2.kt b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.2.kt deleted file mode 100644 index ca206130b36..00000000000 --- a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.2.kt +++ /dev/null @@ -1,7 +0,0 @@ -class My(val value: Int) - -inline fun T.perform(job: (T)-> R) : R { - return job(this) -} - -public inline fun String.toInt2() : Int = java.lang.Integer.parseInt(this) \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.1.kt b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt similarity index 84% rename from compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.1.kt rename to compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt index 2a99af24a43..fb41fb78100 100644 --- a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.1.kt +++ b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt @@ -1,3 +1,15 @@ +// FILE: 1.kt + +class My(val value: Int) + +inline fun T.perform(job: (T)-> R) : R { + return job(this) +} + +public inline fun String.toInt2() : Int = java.lang.Integer.parseInt(this) + +// FILE: 2.kt + fun test1() : Int { val inlineX = My(111) var result = 0 @@ -50,4 +62,4 @@ fun box(): String { if (test2() != -2) return "test2: ${test2()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.2.kt b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.2.kt deleted file mode 100644 index ac6eb698105..00000000000 --- a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.2.kt +++ /dev/null @@ -1,19 +0,0 @@ -class My(val value: Int) - -inline fun T.performWithFail(job: (T)-> R, failJob : (T) -> R) : R { - try { - return job(this) - } catch (e: RuntimeException) { - return failJob(this) - } -} - -inline fun T.performWithFail2(job: (T)-> R, failJob : (e: RuntimeException, T) -> R) : R { - try { - return job(this) - } catch (e: RuntimeException) { - return failJob(e, this) - } -} - -public inline fun String.toInt2() : Int = java.lang.Integer.parseInt(this) \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.1.kt b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt similarity index 83% rename from compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.1.kt rename to compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt index b6be49419fe..d866103368a 100644 --- a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.1.kt +++ b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt @@ -1,3 +1,27 @@ +// FILE: 1.kt + +class My(val value: Int) + +inline fun T.performWithFail(job: (T)-> R, failJob : (T) -> R) : R { + try { + return job(this) + } catch (e: RuntimeException) { + return failJob(this) + } +} + +inline fun T.performWithFail2(job: (T)-> R, failJob : (e: RuntimeException, T) -> R) : R { + try { + return job(this) + } catch (e: RuntimeException) { + return failJob(e, this) + } +} + +public inline fun String.toInt2() : Int = java.lang.Integer.parseInt(this) + +// FILE: 2.kt + fun test1(): Int { val res = My(111).performWithFail( { @@ -104,4 +128,4 @@ fun box(): String { if (test33() != -3) return "test33: ${test33()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.2.kt b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.2.kt deleted file mode 100644 index 3cace55b524..00000000000 --- a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.2.kt +++ /dev/null @@ -1,21 +0,0 @@ -class My(val value: Int) - -inline fun T.performWithFinally(job: (T)-> R, finally: (T) -> R) : R { - try { - return job(this) - } finally { - return finally(this) - } -} - -inline fun T.performWithFailFinally(job: (T)-> R, failJob : (e: RuntimeException, T) -> R, finally: (T) -> R) : R { - try { - return job(this) - } catch (e: RuntimeException) { - return failJob(e, this) - } finally { - return finally(this) - } -} - -inline fun String.toInt2() : Int = java.lang.Integer.parseInt(this) \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.1.kt b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt similarity index 73% rename from compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.1.kt rename to compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt index a9e3a17bdae..cec4fc278ae 100644 --- a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.1.kt +++ b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt @@ -1,3 +1,29 @@ +// FILE: 1.kt + +class My(val value: Int) + +inline fun T.performWithFinally(job: (T)-> R, finally: (T) -> R) : R { + try { + return job(this) + } finally { + return finally(this) + } +} + +inline fun T.performWithFailFinally(job: (T)-> R, failJob : (e: RuntimeException, T) -> R, finally: (T) -> R) : R { + try { + return job(this) + } catch (e: RuntimeException) { + return failJob(e, this) + } finally { + return finally(this) + } +} + +inline fun String.toInt2() : Int = java.lang.Integer.parseInt(this) + +// FILE: 2.kt + fun test1(): Int { var res = My(111).performWithFinally( @@ -70,4 +96,4 @@ fun box(): String { if (test3() != 113) return "test3: ${test3()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/KotlinMultiFileTestWithJava.java b/compiler/tests/org/jetbrains/kotlin/checkers/KotlinMultiFileTestWithJava.java index 0d2d202f38a..0f3cde58a91 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/KotlinMultiFileTestWithJava.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/KotlinMultiFileTestWithJava.java @@ -42,7 +42,7 @@ public abstract class KotlinMultiFileTestWithJava extends KotlinLiteFixtur private File javaFilesDir; private File kotlinSourceRoot; - protected class ModuleAndDependencies { + public class ModuleAndDependencies { final M module; final List dependencies; diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/AbstractBlackBoxCodegenTest.java b/compiler/tests/org/jetbrains/kotlin/codegen/generated/AbstractBlackBoxCodegenTest.java index d3dd5d25e51..0f03e5d34a4 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/AbstractBlackBoxCodegenTest.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/AbstractBlackBoxCodegenTest.java @@ -22,6 +22,7 @@ import com.intellij.util.Processor; import kotlin.io.FilesKt; import kotlin.text.Charsets; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import org.jetbrains.kotlin.cli.common.output.outputUtils.OutputUtilsKt; import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles; import org.jetbrains.kotlin.cli.jvm.compiler.JvmPackagePartProvider; @@ -33,7 +34,10 @@ import org.jetbrains.kotlin.codegen.GeneratedClassLoader; import org.jetbrains.kotlin.codegen.GenerationUtils; import org.jetbrains.kotlin.config.CompilerConfiguration; import org.jetbrains.kotlin.fileClasses.JvmFileClassUtil; +import org.jetbrains.kotlin.psi.KtDeclaration; import org.jetbrains.kotlin.psi.KtFile; +import org.jetbrains.kotlin.psi.KtNamedFunction; +import org.jetbrains.kotlin.psi.KtProperty; import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.InTextDirectivesUtils; import org.jetbrains.kotlin.test.KotlinTestUtils; @@ -88,6 +92,11 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase { private void doTestMultiFile(@NotNull List files) { createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.ALL); + loadMultiFiles(files); + blackBox(); + } + + protected void loadMultiFiles(@NotNull List files) { Collections.sort(files); List ktFiles = new ArrayList(files.size()); @@ -96,8 +105,6 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase { } myFiles = CodegenTestFiles.create(ktFiles); - - blackBox(); } // NOTE: tests under fullJdk/ are run with FULL_JDK instead of MOCK_JDK @@ -180,7 +187,8 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase { // If there are many files, the first 'box(): String' function will be executed. GeneratedClassLoader generatedClassLoader = generateAndCreateClassLoader(); for (KtFile firstFile : myFiles.getPsiFiles()) { - String className = JvmFileClassUtil.getFileClassInfoNoResolve(firstFile).getFacadeClassFqName().asString(); + String className = getFacadeFqName(firstFile); + if (className == null) continue; Class aClass = getGeneratedClass(generatedClassLoader, className); try { Method method = getBoxMethodOrNull(aClass); @@ -197,6 +205,16 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase { } } + @Nullable + private static String getFacadeFqName(@NotNull KtFile firstFile) { + for (KtDeclaration declaration : firstFile.getDeclarations()) { + if (declaration instanceof KtProperty || declaration instanceof KtNamedFunction) { + return JvmFileClassUtil.getFileClassInfoNoResolve(firstFile).getFacadeClassFqName().asString(); + } + } + return null; + } + private static Class getGeneratedClass(GeneratedClassLoader generatedClassLoader, String className) { try { return generatedClassLoader.loadClass(className); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/AbstractBlackBoxInlineCodegenTest.kt b/compiler/tests/org/jetbrains/kotlin/codegen/generated/AbstractBlackBoxInlineCodegenTest.kt index 689513b0803..0ff9faee53a 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/AbstractBlackBoxInlineCodegenTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/AbstractBlackBoxInlineCodegenTest.kt @@ -16,6 +16,7 @@ package org.jetbrains.kotlin.codegen.generated +import org.jetbrains.kotlin.checkers.KotlinMultiFileTestWithJava import org.jetbrains.kotlin.codegen.InlineTestUtil import org.jetbrains.kotlin.codegen.filterClassFiles import org.jetbrains.kotlin.codegen.getClassFiles @@ -24,12 +25,11 @@ import org.jetbrains.kotlin.test.ConfigurationKind import java.io.File abstract class AbstractBlackBoxInlineCodegenTest : AbstractBlackBoxCodegenTest(), AbstractSMAPBaseTest { - fun doTestMultiFileWithInlineCheck(firstFileName: String) { - val fileName = relativePath(File(firstFileName)) - val inputFiles = listOf(fileName, fileName.substringBeforeLast("1.kt") + "2.kt") - + override fun doMultiFileTest( + file: File, modules: Map.ModuleAndDependencies>, files: List + ) { createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.ALL) - loadFiles(*inputFiles.toTypedArray()) + loadMultiFiles(files) blackBox() try { diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java index b6ff303ffa9..707d1374f49 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java @@ -32,7 +32,7 @@ import java.util.regex.Pattern; @RunWith(JUnit3RunnerWithInners.class) public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInBoxInline() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), true); } @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject") @@ -40,133 +40,133 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousObject extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInAnonymousObject() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("anonymousObjectOnCallSite.1.kt") + @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); + doTest(fileName); } - @TestMetadata("anonymousObjectOnCallSiteSuperParams.1.kt") + @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); + doTest(fileName); } - @TestMetadata("anonymousObjectOnDeclarationSite.1.kt") + @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); + doTest(fileName); } - @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.1.kt") + @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); + doTest(fileName); } - @TestMetadata("capturedLambdaInInline.1.kt") + @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); + doTest(fileName); } - @TestMetadata("capturedLambdaInInline2.1.kt") + @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); + doTest(fileName); } - @TestMetadata("capturedLambdaInInline3.1.kt") + @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); + doTest(fileName); } - @TestMetadata("capturedLambdaInInlineObject.1.kt") + @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); + doTest(fileName); } - @TestMetadata("changingReturnType.1.kt") + @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); + doTest(fileName); } - @TestMetadata("constructorVisibility.1.kt") + @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); + doTest(fileName); } - @TestMetadata("constructorVisibilityInConstLambda.1.kt") + @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); + doTest(fileName); } - @TestMetadata("constructorVisibilityInLambda.1.kt") + @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); + doTest(fileName); } - @TestMetadata("kt6552.1.kt") + @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt6552.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); + doTest(fileName); } - @TestMetadata("kt8133.1.kt") + @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); + doTest(fileName); } - @TestMetadata("kt9064.1.kt") + @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); + doTest(fileName); } - @TestMetadata("kt9064v2.1.kt") + @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); + doTest(fileName); } - @TestMetadata("kt9591.1.kt") + @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9591.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); + doTest(fileName); } - @TestMetadata("kt9877.1.kt") + @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); + doTest(fileName); } - @TestMetadata("kt9877_2.1.kt") + @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); + doTest(fileName); } - @TestMetadata("safeCall.1.kt") + @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); + doTest(fileName); } - @TestMetadata("safeCall_2.1.kt") + @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing") @@ -174,43 +174,43 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturing extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInProperRecapturing() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("inlineChain.1.kt") + @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain.1.kt") + @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); + doTest(fileName); } - @TestMetadata("lambdaChainSimple.1.kt") + @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain_2.1.kt") + @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain_3.1.kt") + @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); + doTest(fileName); } - @TestMetadata("noInlineLambda.1.kt") + @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); + doTest(fileName); } } @@ -219,79 +219,79 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturingInClass extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInProperRecapturingInClass() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("inlineChain.1.kt") + @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); + doTest(fileName); } - @TestMetadata("inlinelambdaChain.1.kt") + @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain.1.kt") + @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); + doTest(fileName); } - @TestMetadata("lambdaChainSimple.1.kt") + @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); + doTest(fileName); } - @TestMetadata("lambdaChainSimple_2.1.kt") + @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain_2.1.kt") + @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain_3.1.kt") + @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); + doTest(fileName); } - @TestMetadata("noCapturedThisOnCallSite.1.kt") + @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); + doTest(fileName); } - @TestMetadata("noInlineLambda.1.kt") + @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); + doTest(fileName); } - @TestMetadata("twoInlineLambda.1.kt") + @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); + doTest(fileName); } - @TestMetadata("twoInlineLambdaComplex.1.kt") + @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); + doTest(fileName); } - @TestMetadata("twoInlineLambdaComplex_2.1.kt") + @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); + doTest(fileName); } } @@ -300,37 +300,37 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class TwoCapturedReceivers extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("kt8668.1.kt") + @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); + doTest(fileName); } - @TestMetadata("kt8668_2.1.kt") + @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); + doTest(fileName); } - @TestMetadata("kt8668_3.1.kt") + @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); + doTest(fileName); } - @TestMetadata("twoDifferentDispatchReceivers.1.kt") + @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); + doTest(fileName); } - @TestMetadata("twoExtensionReceivers.1.kt") + @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); + doTest(fileName); } } } @@ -340,55 +340,55 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentOrder extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInArgumentOrder() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("captured.1.kt") + @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/captured.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); + doTest(fileName); } - @TestMetadata("capturedInExtension.1.kt") + @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); + doTest(fileName); } - @TestMetadata("extension.1.kt") + @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extension.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); + doTest(fileName); } - @TestMetadata("extensionInClass.1.kt") + @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); + doTest(fileName); } - @TestMetadata("lambdaMigration.1.kt") + @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); + doTest(fileName); } - @TestMetadata("lambdaMigrationInClass.1.kt") + @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); + doTest(fileName); } - @TestMetadata("simple.1.kt") + @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simple.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); + doTest(fileName); } - @TestMetadata("simpleInClass.1.kt") + @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); + doTest(fileName); } } @@ -397,43 +397,43 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class ArrayConvention extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInArrayConvention() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("simpleAccess.1.kt") + @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); + doTest(fileName); } - @TestMetadata("simpleAccessInClass.1.kt") + @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); + doTest(fileName); } - @TestMetadata("simpleAccessWithDefault.1.kt") + @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); + doTest(fileName); } - @TestMetadata("simpleAccessWithDefaultInClass.1.kt") + @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); + doTest(fileName); } - @TestMetadata("simpleAccessWithLambda.1.kt") + @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); + doTest(fileName); } - @TestMetadata("simpleAccessWithLambdaInClass.1.kt") + @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); + doTest(fileName); } } @@ -442,19 +442,19 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Builders extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInBuilders() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("builders.1.kt") + @TestMetadata("builders.kt") public void testBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/builders.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/builders.kt"); + doTest(fileName); } - @TestMetadata("buildersAndLambdaCapturing.1.kt") + @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); + doTest(fileName); } } @@ -463,43 +463,43 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInCallableReference() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("classLevel.1.kt") + @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); + doTest(fileName); } - @TestMetadata("classLevel2.1.kt") + @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); + doTest(fileName); } - @TestMetadata("constructor.1.kt") + @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/constructor.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); + doTest(fileName); } - @TestMetadata("intrinsic.1.kt") + @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/intrinsic.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); + doTest(fileName); } - @TestMetadata("topLevel.1.kt") + @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevel.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); + doTest(fileName); } - @TestMetadata("topLevelExtension.1.kt") + @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); + doTest(fileName); } } @@ -508,43 +508,43 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Capture extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInCapture() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("captureInlinable.1.kt") + @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinable.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); + doTest(fileName); } - @TestMetadata("captureInlinableAndOther.1.kt") + @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); + doTest(fileName); } - @TestMetadata("captureThisAndReceiver.1.kt") + @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); + doTest(fileName); } - @TestMetadata("generics.1.kt") + @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/generics.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/generics.kt"); + doTest(fileName); } - @TestMetadata("simpleCapturingInClass.1.kt") + @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); + doTest(fileName); } - @TestMetadata("simpleCapturingInPackage.1.kt") + @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); + doTest(fileName); } } @@ -553,37 +553,37 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Complex extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInComplex() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("closureChain.1.kt") + @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/closureChain.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/closureChain.kt"); + doTest(fileName); } - @TestMetadata("forEachLine.1.kt") + @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/forEachLine.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); + doTest(fileName); } - @TestMetadata("lambdaInLambda.1.kt") + @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/lambdaInLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); + doTest(fileName); } - @TestMetadata("use.1.kt") + @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/use.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/use.kt"); + doTest(fileName); } - @TestMetadata("with.1.kt") + @TestMetadata("with.kt") public void testWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/with.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/with.kt"); + doTest(fileName); } } @@ -592,49 +592,49 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class ComplexStack extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInComplexStack() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("asCheck.1.kt") + @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); + doTest(fileName); } - @TestMetadata("asCheck2.1.kt") + @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); + doTest(fileName); } - @TestMetadata("simple.1.kt") + @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple.kt"); + doTest(fileName); } - @TestMetadata("simple2.1.kt") + @TestMetadata("simple2.kt") public void testSimple2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); + doTest(fileName); } - @TestMetadata("simple3.1.kt") + @TestMetadata("simple3.kt") public void testSimple3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple3.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); + doTest(fileName); } - @TestMetadata("simple4.1.kt") + @TestMetadata("simple4.kt") public void testSimple4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple4.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); + doTest(fileName); } - @TestMetadata("simpleExtension.1.kt") + @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simpleExtension.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); + doTest(fileName); } } @@ -643,49 +643,49 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class DefaultValues extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInDefaultValues() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("defaultInExtension.1.kt") + @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); + doTest(fileName); } - @TestMetadata("defaultMethod.1.kt") + @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); + doTest(fileName); } - @TestMetadata("defaultMethodInClass.1.kt") + @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); + doTest(fileName); } - @TestMetadata("defaultParamRemapping.1.kt") + @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); + doTest(fileName); } - @TestMetadata("inlineInDefaultParameter.1.kt") + @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); + doTest(fileName); } - @TestMetadata("kt5685.1.kt") + @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt5685.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); + doTest(fileName); } - @TestMetadata("simpleDefaultMethod.1.kt") + @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); + doTest(fileName); } } @@ -694,49 +694,49 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class EnclosingInfo extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInEnclosingInfo() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("anonymousInLambda.1.kt") + @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); + doTest(fileName); } - @TestMetadata("inlineChain.1.kt") + @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); + doTest(fileName); } - @TestMetadata("inlineChain2.1.kt") + @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); + doTest(fileName); } - @TestMetadata("objectInInlineFun.1.kt") + @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); + doTest(fileName); } - @TestMetadata("transformedConstructor.1.kt") + @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); + doTest(fileName); } - @TestMetadata("transformedConstructorWithAdditionalObject.1.kt") + @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); + doTest(fileName); } - @TestMetadata("transformedConstructorWithNestedInline.1.kt") + @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); + doTest(fileName); } } @@ -745,13 +745,13 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class FunctionExpression extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInFunctionExpression() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("extension.1.kt") + @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/functionExpression/extension.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); + doTest(fileName); } } @@ -760,19 +760,19 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class InnerClasses extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInInnerClasses() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("innerLambda.1.kt") + @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/innerLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); + doTest(fileName); } - @TestMetadata("kt10259.1.kt") + @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/kt10259.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); + doTest(fileName); } } @@ -781,19 +781,19 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class LambdaClassClash extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInLambdaClassClash() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("lambdaClassClash.1.kt") + @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); + doTest(fileName); } - @TestMetadata("noInlineLambdaX2.1.kt") + @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); + doTest(fileName); } } @@ -802,37 +802,37 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class LambdaTransformation extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInLambdaTransformation() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("lambdaCloning.1.kt") + @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); + doTest(fileName); } - @TestMetadata("lambdaInLambda2.1.kt") + @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); + doTest(fileName); } - @TestMetadata("lambdaInLambdaNoInline.1.kt") + @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); + doTest(fileName); } - @TestMetadata("regeneratedLambdaName.1.kt") + @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); + doTest(fileName); } - @TestMetadata("sameCaptured.1.kt") + @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); + doTest(fileName); } } @@ -841,13 +841,13 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunInLambda extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInLocalFunInLambda() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("localFunInLambda.1.kt") + @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); + doTest(fileName); } } @@ -856,13 +856,13 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInMultifileClasses() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("inlineFromOtherPackage.1.kt") + @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); + doTest(fileName); } } @@ -871,49 +871,49 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class NoInline extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInNoInline() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("extensionReceiver.1.kt") + @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/extensionReceiver.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); + doTest(fileName); } - @TestMetadata("lambdaAsGeneric.1.kt") + @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); + doTest(fileName); } - @TestMetadata("lambdaAsNonFunction.1.kt") + @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); + doTest(fileName); } - @TestMetadata("noInline.1.kt") + @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInline.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInline.kt"); + doTest(fileName); } - @TestMetadata("noInlineLambdaChain.1.kt") + @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); + doTest(fileName); } - @TestMetadata("noInlineLambdaChainWithCapturedInline.1.kt") + @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); + doTest(fileName); } - @TestMetadata("withoutInline.1.kt") + @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/withoutInline.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); + doTest(fileName); } } @@ -922,85 +922,85 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInNonLocalReturns() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("explicitLocalReturn.1.kt") + @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); + doTest(fileName); } - @TestMetadata("justReturnInLambda.1.kt") + @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); + doTest(fileName); } - @TestMetadata("kt5199.1.kt") + @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); + doTest(fileName); } - @TestMetadata("kt8948.1.kt") + @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); + doTest(fileName); } - @TestMetadata("kt8948v2.1.kt") + @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); + doTest(fileName); } - @TestMetadata("nestedNonLocals.1.kt") + @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); + doTest(fileName); } - @TestMetadata("noInlineLocalReturn.1.kt") + @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); + doTest(fileName); } - @TestMetadata("nonLocalReturnFromOuterLambda.1.kt") + @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); + doTest(fileName); } - @TestMetadata("propertyAccessors.1.kt") + @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); + doTest(fileName); } - @TestMetadata("returnFromFunctionExpr.1.kt") + @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); + doTest(fileName); } - @TestMetadata("simple.1.kt") + @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simple.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); + doTest(fileName); } - @TestMetadata("simpleFunctional.1.kt") + @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); + doTest(fileName); } - @TestMetadata("simpleVoid.1.kt") + @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @@ -1008,19 +1008,19 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Deparenthesize extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInDeparenthesize() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("bracket.1.kt") + @TestMetadata("bracket.kt") public void testBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); + doTest(fileName); } - @TestMetadata("labeled.1.kt") + @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); + doTest(fileName); } } @@ -1029,25 +1029,25 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class TryFinally extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInTryFinally() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("kt6956.1.kt") + @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); + doTest(fileName); } - @TestMetadata("kt7273.1.kt") + @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); + doTest(fileName); } - @TestMetadata("nonLocalReturnFromOuterLambda.1.kt") + @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @@ -1055,43 +1055,43 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class CallSite extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInCallSite() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("callSite.1.kt") + @TestMetadata("callSite.kt") public void testCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); + doTest(fileName); } - @TestMetadata("callSiteComplex.1.kt") + @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); + doTest(fileName); } - @TestMetadata("exceptionTableSplit.1.kt") + @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); + doTest(fileName); } - @TestMetadata("exceptionTableSplitNoReturn.1.kt") + @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); + doTest(fileName); } - @TestMetadata("finallyInFinally.1.kt") + @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); + doTest(fileName); } - @TestMetadata("wrongVarInterval.1.kt") + @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); + doTest(fileName); } } @@ -1100,55 +1100,55 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Chained extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInChained() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("finallyInFinally.1.kt") + @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); + doTest(fileName); } - @TestMetadata("finallyInFinally2.1.kt") + @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); + doTest(fileName); } - @TestMetadata("intReturn.1.kt") + @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); + doTest(fileName); } - @TestMetadata("intReturnComplex.1.kt") + @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); + doTest(fileName); } - @TestMetadata("intReturnComplex2.1.kt") + @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); + doTest(fileName); } - @TestMetadata("intReturnComplex3.1.kt") + @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); + doTest(fileName); } - @TestMetadata("intReturnComplex4.1.kt") + @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); + doTest(fileName); } - @TestMetadata("nestedLambda.1.kt") + @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); + doTest(fileName); } } @@ -1157,79 +1157,79 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class DeclSite extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInDeclSite() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("complex.1.kt") + @TestMetadata("complex.kt") public void testComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); + doTest(fileName); } - @TestMetadata("intReturn.1.kt") + @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); + doTest(fileName); } - @TestMetadata("intReturnComplex.1.kt") + @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); + doTest(fileName); } - @TestMetadata("longReturn.1.kt") + @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); + doTest(fileName); } - @TestMetadata("nested.1.kt") + @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); + doTest(fileName); } - @TestMetadata("returnInFinally.1.kt") + @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); + doTest(fileName); } - @TestMetadata("returnInTry.1.kt") + @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); + doTest(fileName); } - @TestMetadata("returnInTryAndFinally.1.kt") + @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); + doTest(fileName); } - @TestMetadata("severalInTry.1.kt") + @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); + doTest(fileName); } - @TestMetadata("severalInTryComplex.1.kt") + @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); + doTest(fileName); } - @TestMetadata("voidInlineFun.1.kt") + @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); + doTest(fileName); } - @TestMetadata("voidNonLocal.1.kt") + @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); + doTest(fileName); } } @@ -1238,103 +1238,103 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class ExceptionTable extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInExceptionTable() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("break.1.kt") + @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); + doTest(fileName); } - @TestMetadata("continue.1.kt") + @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); + doTest(fileName); } - @TestMetadata("exceptionInFinally.1.kt") + @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); + doTest(fileName); } - @TestMetadata("forInFinally.1.kt") + @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); + doTest(fileName); } - @TestMetadata("innerAndExternal.1.kt") + @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); + doTest(fileName); } - @TestMetadata("innerAndExternalNested.1.kt") + @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); + doTest(fileName); } - @TestMetadata("innerAndExternalSimple.1.kt") + @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); + doTest(fileName); } - @TestMetadata("nested.1.kt") + @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); + doTest(fileName); } - @TestMetadata("nestedWithReturns.1.kt") + @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); + doTest(fileName); } - @TestMetadata("nestedWithReturnsSimple.1.kt") + @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); + doTest(fileName); } - @TestMetadata("noFinally.1.kt") + @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); + doTest(fileName); } - @TestMetadata("severalCatchClause.1.kt") + @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); + doTest(fileName); } - @TestMetadata("simpleThrow.1.kt") + @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); + doTest(fileName); } - @TestMetadata("synchonized.1.kt") + @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); + doTest(fileName); } - @TestMetadata("throwInFinally.1.kt") + @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); + doTest(fileName); } - @TestMetadata("tryCatchInFinally.1.kt") + @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); + doTest(fileName); } } @@ -1343,13 +1343,13 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInVariables() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("kt7792.1.kt") + @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); + doTest(fileName); } } } @@ -1359,80 +1359,80 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractBlackBoxInlineCodegenTest { - @TestMetadata("accessorForConst.1.kt") + @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorForConst.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); + doTest(fileName); } - @TestMetadata("accessorStability.1.kt") + @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStability.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStability.kt"); + doTest(fileName); } - @TestMetadata("accessorStabilityInClass.1.kt") + @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); + doTest(fileName); } public void testAllFilesPresentInPrivate() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("effectivePrivate.1.kt") + @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/effectivePrivate.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); + doTest(fileName); } - @TestMetadata("kt6453.1.kt") + @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt6453.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt6453.kt"); + doTest(fileName); } - @TestMetadata("kt8094.1.kt") + @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.kt"); + doTest(fileName); } - @TestMetadata("kt8095.1.kt") + @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8095.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8095.kt"); + doTest(fileName); } - @TestMetadata("nestedInPrivateClass.1.kt") + @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); + doTest(fileName); } - @TestMetadata("privateClass.1.kt") + @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClass.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClass.kt"); + doTest(fileName); } - @TestMetadata("privateClassExtensionLambda.1.kt") + @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); + doTest(fileName); } - @TestMetadata("privateInInlineInMultiFileFacade.1.kt") + @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); + doTest(fileName); } - @TestMetadata("privateInline.1.kt") + @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInline.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInline.kt"); + doTest(fileName); } } @@ -1441,73 +1441,73 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInReified() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("capturedLambda.1.kt") + @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); + doTest(fileName); } - @TestMetadata("capturedLambda2.1.kt") + @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); + doTest(fileName); } - @TestMetadata("kt11081.1.kt") + @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11081.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11081.kt"); + doTest(fileName); } - @TestMetadata("kt6988.1.kt") + @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988.kt"); + doTest(fileName); } - @TestMetadata("kt6988_2.1.kt") + @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988_2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); + doTest(fileName); } - @TestMetadata("kt6990.1.kt") + @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6990.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6990.kt"); + doTest(fileName); } - @TestMetadata("kt7017.1.kt") + @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt7017.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt7017.kt"); + doTest(fileName); } - @TestMetadata("kt8047.1.kt") + @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt8047.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt8047.kt"); + doTest(fileName); } - @TestMetadata("kt9637.1.kt") + @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637.kt"); + doTest(fileName); } - @TestMetadata("kt9637_2.1.kt") + @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637_2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); + doTest(fileName); } - @TestMetadata("packages.1.kt") + @TestMetadata("packages.kt") public void testPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/packages.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/packages.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @@ -1515,43 +1515,43 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class CheckCast extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInCheckCast() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("chain.1.kt") + @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/chain.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); + doTest(fileName); } - @TestMetadata("kt8043.1.kt") + @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); + doTest(fileName); } - @TestMetadata("maxStack.1.kt") + @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); + doTest(fileName); } - @TestMetadata("nullable.1.kt") + @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/nullable.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); + doTest(fileName); } - @TestMetadata("simple.1.kt") + @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simple.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); + doTest(fileName); } - @TestMetadata("simpleSafe.1.kt") + @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); + doTest(fileName); } } @@ -1560,25 +1560,25 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class IsCheck extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInIsCheck() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("chain.1.kt") + @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/chain.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); + doTest(fileName); } - @TestMetadata("nullable.1.kt") + @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/nullable.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); + doTest(fileName); } - @TestMetadata("simple.1.kt") + @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/simple.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); + doTest(fileName); } } } @@ -1588,61 +1588,61 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Signature extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInSignature() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("inProjectionSubstitution.1.kt") + @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); + doTest(fileName); } - @TestMetadata("outProjectionSubstitution.1.kt") + @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); + doTest(fileName); } - @TestMetadata("recursion.1.kt") + @TestMetadata("recursion.kt") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/recursion.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/recursion.kt"); + doTest(fileName); } - @TestMetadata("sameFormalParameterName.1.kt") + @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); + doTest(fileName); } - @TestMetadata("sameReifiedFormalParameterName.1.kt") + @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); + doTest(fileName); } - @TestMetadata("starProjectionSubstitution.1.kt") + @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); + doTest(fileName); } - @TestMetadata("typeParameterInLambda.1.kt") + @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); + doTest(fileName); } - @TestMetadata("typeParametersSubstitution.1.kt") + @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); + doTest(fileName); } - @TestMetadata("typeParametersSubstitution2.1.kt") + @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); + doTest(fileName); } } @@ -1651,97 +1651,97 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Simple extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInSimple() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("classObject.1.kt") + @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/classObject.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/classObject.kt"); + doTest(fileName); } - @TestMetadata("extension.1.kt") + @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extension.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extension.kt"); + doTest(fileName); } - @TestMetadata("extensionLambda.1.kt") + @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extensionLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); + doTest(fileName); } - @TestMetadata("params.1.kt") + @TestMetadata("params.kt") public void testParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/params.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/params.kt"); + doTest(fileName); } - @TestMetadata("rootConstructor.1.kt") + @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/rootConstructor.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); + doTest(fileName); } - @TestMetadata("safeCall.1.kt") + @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/safeCall.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/safeCall.kt"); + doTest(fileName); } - @TestMetadata("severalClosures.1.kt") + @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalClosures.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); + doTest(fileName); } - @TestMetadata("severalUsage.1.kt") + @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalUsage.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); + doTest(fileName); } - @TestMetadata("simpleDouble.1.kt") + @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleDouble.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); + doTest(fileName); } - @TestMetadata("simpleEnum.1.kt") + @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleEnum.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); + doTest(fileName); } - @TestMetadata("simpleGenerics.1.kt") + @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleGenerics.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); + doTest(fileName); } - @TestMetadata("simpleInt.1.kt") + @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleInt.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); + doTest(fileName); } - @TestMetadata("simpleLambda.1.kt") + @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleLambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); + doTest(fileName); } - @TestMetadata("simpleObject.1.kt") + @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleObject.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); + doTest(fileName); } - @TestMetadata("vararg.1.kt") + @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/vararg.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/vararg.kt"); + doTest(fileName); } } @@ -1750,31 +1750,31 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Smap extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInSmap() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("assertion.1.kt") + @TestMetadata("assertion.kt") public void testAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/assertion.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/assertion.kt"); + doTest(fileName); } - @TestMetadata("classFromDefaultPackage.1.kt") + @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); + doTest(fileName); } - @TestMetadata("oneFile.1.kt") + @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.kt"); + doTest(fileName); } - @TestMetadata("smap.1.kt") + @TestMetadata("smap.kt") public void testSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/smap.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/smap.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @@ -1782,55 +1782,55 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Anonymous extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInAnonymous() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("lambda.1.kt") + @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambda.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); + doTest(fileName); } - @TestMetadata("lambdaOnCallSite.1.kt") + @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); + doTest(fileName); } - @TestMetadata("lambdaOnInlineCallSite.1.kt") + @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); + doTest(fileName); } - @TestMetadata("object.1.kt") + @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/object.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); + doTest(fileName); } - @TestMetadata("objectOnCallSite.1.kt") + @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); + doTest(fileName); } - @TestMetadata("objectOnInlineCallSite.1.kt") + @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); + doTest(fileName); } - @TestMetadata("objectOnInlineCallSite2.1.kt") + @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); + doTest(fileName); } - @TestMetadata("objectOnInlineCallSiteWithCapture.1.kt") + @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); + doTest(fileName); } } @@ -1839,19 +1839,19 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class InlineOnly extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInInlineOnly() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("noSmap.1.kt") + @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); + doTest(fileName); } - @TestMetadata("reified.1.kt") + @TestMetadata("reified.kt") public void testReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); + doTest(fileName); } } @@ -1860,19 +1860,19 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInResolve() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("inlineComponent.1.kt") + @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); + doTest(fileName); } - @TestMetadata("inlineIterator.1.kt") + @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); + doTest(fileName); } } } @@ -1882,43 +1882,43 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Special extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInSpecial() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("identityCheck.1.kt") + @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/identityCheck.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/identityCheck.kt"); + doTest(fileName); } - @TestMetadata("ifBranches.1.kt") + @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/ifBranches.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/ifBranches.kt"); + doTest(fileName); } - @TestMetadata("iinc.1.kt") + @TestMetadata("iinc.kt") public void testIinc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/iinc.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/iinc.kt"); + doTest(fileName); } - @TestMetadata("inlineChain.1.kt") + @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/inlineChain.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/inlineChain.kt"); + doTest(fileName); } - @TestMetadata("plusAssign.1.kt") + @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/plusAssign.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/plusAssign.kt"); + doTest(fileName); } - @TestMetadata("stackHeightBug.1.kt") + @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/stackHeightBug.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); + doTest(fileName); } } @@ -1927,49 +1927,49 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAccessors extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInSyntheticAccessors() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("constField.1.kt") + @TestMetadata("constField.kt") public void testConstField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/constField.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); + doTest(fileName); } - @TestMetadata("packagePrivateMembers.1.kt") + @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); + doTest(fileName); } - @TestMetadata("propertyModifiers.1.kt") + @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); + doTest(fileName); } - @TestMetadata("protectedMembers.1.kt") + @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); + doTest(fileName); } - @TestMetadata("protectedMembersFromSuper.1.kt") + @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); + doTest(fileName); } - @TestMetadata("superCall.1.kt") + @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); + doTest(fileName); } - @TestMetadata("superProperty.1.kt") + @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @@ -1977,43 +1977,43 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class WithinInlineLambda extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInWithinInlineLambda() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("directFieldAccess.1.kt") + @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); + doTest(fileName); } - @TestMetadata("directFieldAccessInCrossInline.1.kt") + @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); + doTest(fileName); } - @TestMetadata("privateCall.1.kt") + @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); + doTest(fileName); } - @TestMetadata("privateInCrossInline.1.kt") + @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); + doTest(fileName); } - @TestMetadata("superCall.1.kt") + @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); + doTest(fileName); } - @TestMetadata("superInCrossInline.1.kt") + @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); + doTest(fileName); } } } @@ -2023,13 +2023,13 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInTrait() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("trait.1.kt") + @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/trait/trait.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/trait/trait.kt"); + doTest(fileName); } } @@ -2038,31 +2038,31 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchFinally extends AbstractBlackBoxInlineCodegenTest { public void testAllFilesPresentInTryCatchFinally() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("kt5863.1.kt") + @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); + doTest(fileName); } - @TestMetadata("tryCatch.1.kt") + @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); + doTest(fileName); } - @TestMetadata("tryCatch2.1.kt") + @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); + doTest(fileName); } - @TestMetadata("tryCatchFinally.1.kt") + @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.1.kt"); - doTestMultiFileWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); + doTest(fileName); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstInlineKotlinTest.kt b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstInlineKotlinTest.kt index 7d0294057fb..9efd4a5b141 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstInlineKotlinTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstInlineKotlinTest.kt @@ -16,45 +16,33 @@ package org.jetbrains.kotlin.jvm.compiler +import org.jetbrains.kotlin.checkers.KotlinMultiFileTestWithJava import org.jetbrains.kotlin.codegen.ClassFileFactory -import org.jetbrains.kotlin.codegen.CodegenTestCase import org.jetbrains.kotlin.codegen.InlineTestUtil import org.jetbrains.kotlin.codegen.filterClassFiles import org.jetbrains.kotlin.load.kotlin.PackagePartClassUtils -import org.jetbrains.kotlin.test.KotlinTestUtils import java.io.File abstract class AbstractCompileKotlinAgainstInlineKotlinTest : AbstractCompileKotlinAgainstKotlinTest(), AbstractSMAPBaseTest { - protected fun doBoxTest(firstFileName: String): Pair { - var files: List = KotlinTestUtils.createTestFiles( - firstFileName, KotlinTestUtils.doLoadFile(File(firstFileName)), - object : KotlinTestUtils.TestFileFactory { - override fun createFile( - module: Unit?, fileName: String, text: String, directives: Map - ): CodegenTestCase.TestFile { - return CodegenTestCase.TestFile(fileName, text) - } - - override fun createModule(name: String, dependencies: List) { - throw UnsupportedOperationException() - } - }) - - // TODO: drop this (migrate codegen/box/inline/) - if (files.size == 1) { - val firstFile = files.iterator().next() - val secondFile = File(firstFileName.replace("1.kt", "2.kt")) - files = listOf(firstFile, CodegenTestCase.TestFile(secondFile.name, KotlinTestUtils.doLoadFile(secondFile))) - } + override fun doMultiFileTest( + file: File, modules: Map.ModuleAndDependencies>, files: List + ) { + assert(files.size == 2) { "There should be exactly two files in this test" } var factory1: ClassFileFactory? = null var factory2: ClassFileFactory? = null try { - val fileA = files[1] - val fileB = files[0] + val fileA = files[0] + val fileB = files[1] factory1 = compileA(fileA.name, fileA.content) factory2 = compileB(fileB.name, fileB.content) invokeBox(PackagePartClassUtils.getFilePartShortName(File(fileB.name).name)) + + val allGeneratedFiles = factory1.asList() + factory2.asList() + + val sourceFiles = factory1.inputFiles + factory2.inputFiles + InlineTestUtil.checkNoCallsToInline(allGeneratedFiles.filterClassFiles(), sourceFiles) + checkSMAP(sourceFiles, allGeneratedFiles.filterClassFiles()) } catch (e: Throwable) { var result = "" @@ -67,22 +55,5 @@ abstract class AbstractCompileKotlinAgainstInlineKotlinTest : AbstractCompileKot println(result) throw e } - - return Pair(factory1, factory2) - } - - fun doBoxTestWithInlineCheck(firstFileName: String) { - val (factory1, factory2) = doBoxTest(firstFileName) - val allGeneratedFiles = factory1.asList() + factory2.asList() - - try { - val sourceFiles = factory1.inputFiles + factory2.inputFiles - InlineTestUtil.checkNoCallsToInline(allGeneratedFiles.filterClassFiles(), sourceFiles) - checkSMAP(sourceFiles, allGeneratedFiles.filterClassFiles()) - } - catch (e: Throwable) { - System.out.println(factory1.createText() + "\n" + factory2.createText()) - throw e - } } } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java index df35dcc59ca..c2b26eeab6b 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -32,7 +32,7 @@ import java.util.regex.Pattern; @RunWith(JUnit3RunnerWithInners.class) public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInBoxInline() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), true); } @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject") @@ -40,133 +40,133 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousObject extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInAnonymousObject() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("anonymousObjectOnCallSite.1.kt") + @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); + doTest(fileName); } - @TestMetadata("anonymousObjectOnCallSiteSuperParams.1.kt") + @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); + doTest(fileName); } - @TestMetadata("anonymousObjectOnDeclarationSite.1.kt") + @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); + doTest(fileName); } - @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.1.kt") + @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); + doTest(fileName); } - @TestMetadata("capturedLambdaInInline.1.kt") + @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); + doTest(fileName); } - @TestMetadata("capturedLambdaInInline2.1.kt") + @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); + doTest(fileName); } - @TestMetadata("capturedLambdaInInline3.1.kt") + @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); + doTest(fileName); } - @TestMetadata("capturedLambdaInInlineObject.1.kt") + @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); + doTest(fileName); } - @TestMetadata("changingReturnType.1.kt") + @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); + doTest(fileName); } - @TestMetadata("constructorVisibility.1.kt") + @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); + doTest(fileName); } - @TestMetadata("constructorVisibilityInConstLambda.1.kt") + @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); + doTest(fileName); } - @TestMetadata("constructorVisibilityInLambda.1.kt") + @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); + doTest(fileName); } - @TestMetadata("kt6552.1.kt") + @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt6552.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); + doTest(fileName); } - @TestMetadata("kt8133.1.kt") + @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); + doTest(fileName); } - @TestMetadata("kt9064.1.kt") + @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); + doTest(fileName); } - @TestMetadata("kt9064v2.1.kt") + @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); + doTest(fileName); } - @TestMetadata("kt9591.1.kt") + @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9591.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); + doTest(fileName); } - @TestMetadata("kt9877.1.kt") + @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); + doTest(fileName); } - @TestMetadata("kt9877_2.1.kt") + @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); + doTest(fileName); } - @TestMetadata("safeCall.1.kt") + @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); + doTest(fileName); } - @TestMetadata("safeCall_2.1.kt") + @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing") @@ -174,43 +174,43 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturing extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInProperRecapturing() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("inlineChain.1.kt") + @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain.1.kt") + @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); + doTest(fileName); } - @TestMetadata("lambdaChainSimple.1.kt") + @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain_2.1.kt") + @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain_3.1.kt") + @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); + doTest(fileName); } - @TestMetadata("noInlineLambda.1.kt") + @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); + doTest(fileName); } } @@ -219,79 +219,79 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturingInClass extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInProperRecapturingInClass() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("inlineChain.1.kt") + @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); + doTest(fileName); } - @TestMetadata("inlinelambdaChain.1.kt") + @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain.1.kt") + @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); + doTest(fileName); } - @TestMetadata("lambdaChainSimple.1.kt") + @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); + doTest(fileName); } - @TestMetadata("lambdaChainSimple_2.1.kt") + @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain_2.1.kt") + @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); + doTest(fileName); } - @TestMetadata("lambdaChain_3.1.kt") + @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); + doTest(fileName); } - @TestMetadata("noCapturedThisOnCallSite.1.kt") + @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); + doTest(fileName); } - @TestMetadata("noInlineLambda.1.kt") + @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); + doTest(fileName); } - @TestMetadata("twoInlineLambda.1.kt") + @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); + doTest(fileName); } - @TestMetadata("twoInlineLambdaComplex.1.kt") + @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); + doTest(fileName); } - @TestMetadata("twoInlineLambdaComplex_2.1.kt") + @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); + doTest(fileName); } } @@ -300,37 +300,37 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class TwoCapturedReceivers extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("kt8668.1.kt") + @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); + doTest(fileName); } - @TestMetadata("kt8668_2.1.kt") + @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); + doTest(fileName); } - @TestMetadata("kt8668_3.1.kt") + @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); + doTest(fileName); } - @TestMetadata("twoDifferentDispatchReceivers.1.kt") + @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); + doTest(fileName); } - @TestMetadata("twoExtensionReceivers.1.kt") + @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); + doTest(fileName); } } } @@ -340,55 +340,55 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentOrder extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInArgumentOrder() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("captured.1.kt") + @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/captured.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); + doTest(fileName); } - @TestMetadata("capturedInExtension.1.kt") + @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); + doTest(fileName); } - @TestMetadata("extension.1.kt") + @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extension.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); + doTest(fileName); } - @TestMetadata("extensionInClass.1.kt") + @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); + doTest(fileName); } - @TestMetadata("lambdaMigration.1.kt") + @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); + doTest(fileName); } - @TestMetadata("lambdaMigrationInClass.1.kt") + @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); + doTest(fileName); } - @TestMetadata("simple.1.kt") + @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simple.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); + doTest(fileName); } - @TestMetadata("simpleInClass.1.kt") + @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); + doTest(fileName); } } @@ -397,43 +397,43 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class ArrayConvention extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInArrayConvention() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("simpleAccess.1.kt") + @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); + doTest(fileName); } - @TestMetadata("simpleAccessInClass.1.kt") + @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); + doTest(fileName); } - @TestMetadata("simpleAccessWithDefault.1.kt") + @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); + doTest(fileName); } - @TestMetadata("simpleAccessWithDefaultInClass.1.kt") + @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); + doTest(fileName); } - @TestMetadata("simpleAccessWithLambda.1.kt") + @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); + doTest(fileName); } - @TestMetadata("simpleAccessWithLambdaInClass.1.kt") + @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); + doTest(fileName); } } @@ -442,19 +442,19 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Builders extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInBuilders() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("builders.1.kt") + @TestMetadata("builders.kt") public void testBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/builders.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/builders.kt"); + doTest(fileName); } - @TestMetadata("buildersAndLambdaCapturing.1.kt") + @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); + doTest(fileName); } } @@ -463,43 +463,43 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInCallableReference() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("classLevel.1.kt") + @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); + doTest(fileName); } - @TestMetadata("classLevel2.1.kt") + @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); + doTest(fileName); } - @TestMetadata("constructor.1.kt") + @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/constructor.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); + doTest(fileName); } - @TestMetadata("intrinsic.1.kt") + @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/intrinsic.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); + doTest(fileName); } - @TestMetadata("topLevel.1.kt") + @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevel.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); + doTest(fileName); } - @TestMetadata("topLevelExtension.1.kt") + @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); + doTest(fileName); } } @@ -508,43 +508,43 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Capture extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInCapture() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("captureInlinable.1.kt") + @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinable.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); + doTest(fileName); } - @TestMetadata("captureInlinableAndOther.1.kt") + @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); + doTest(fileName); } - @TestMetadata("captureThisAndReceiver.1.kt") + @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); + doTest(fileName); } - @TestMetadata("generics.1.kt") + @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/generics.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/generics.kt"); + doTest(fileName); } - @TestMetadata("simpleCapturingInClass.1.kt") + @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); + doTest(fileName); } - @TestMetadata("simpleCapturingInPackage.1.kt") + @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); + doTest(fileName); } } @@ -553,37 +553,37 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Complex extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInComplex() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("closureChain.1.kt") + @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/closureChain.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/closureChain.kt"); + doTest(fileName); } - @TestMetadata("forEachLine.1.kt") + @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/forEachLine.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); + doTest(fileName); } - @TestMetadata("lambdaInLambda.1.kt") + @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/lambdaInLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); + doTest(fileName); } - @TestMetadata("use.1.kt") + @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/use.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/use.kt"); + doTest(fileName); } - @TestMetadata("with.1.kt") + @TestMetadata("with.kt") public void testWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/with.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/with.kt"); + doTest(fileName); } } @@ -592,49 +592,49 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class ComplexStack extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInComplexStack() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("asCheck.1.kt") + @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); + doTest(fileName); } - @TestMetadata("asCheck2.1.kt") + @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); + doTest(fileName); } - @TestMetadata("simple.1.kt") + @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple.kt"); + doTest(fileName); } - @TestMetadata("simple2.1.kt") + @TestMetadata("simple2.kt") public void testSimple2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); + doTest(fileName); } - @TestMetadata("simple3.1.kt") + @TestMetadata("simple3.kt") public void testSimple3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple3.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); + doTest(fileName); } - @TestMetadata("simple4.1.kt") + @TestMetadata("simple4.kt") public void testSimple4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple4.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); + doTest(fileName); } - @TestMetadata("simpleExtension.1.kt") + @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simpleExtension.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); + doTest(fileName); } } @@ -643,49 +643,49 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class DefaultValues extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInDefaultValues() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("defaultInExtension.1.kt") + @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); + doTest(fileName); } - @TestMetadata("defaultMethod.1.kt") + @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); + doTest(fileName); } - @TestMetadata("defaultMethodInClass.1.kt") + @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); + doTest(fileName); } - @TestMetadata("defaultParamRemapping.1.kt") + @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); + doTest(fileName); } - @TestMetadata("inlineInDefaultParameter.1.kt") + @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); + doTest(fileName); } - @TestMetadata("kt5685.1.kt") + @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt5685.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); + doTest(fileName); } - @TestMetadata("simpleDefaultMethod.1.kt") + @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); + doTest(fileName); } } @@ -694,49 +694,49 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class EnclosingInfo extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInEnclosingInfo() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("anonymousInLambda.1.kt") + @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); + doTest(fileName); } - @TestMetadata("inlineChain.1.kt") + @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); + doTest(fileName); } - @TestMetadata("inlineChain2.1.kt") + @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); + doTest(fileName); } - @TestMetadata("objectInInlineFun.1.kt") + @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); + doTest(fileName); } - @TestMetadata("transformedConstructor.1.kt") + @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); + doTest(fileName); } - @TestMetadata("transformedConstructorWithAdditionalObject.1.kt") + @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); + doTest(fileName); } - @TestMetadata("transformedConstructorWithNestedInline.1.kt") + @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); + doTest(fileName); } } @@ -745,13 +745,13 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class FunctionExpression extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInFunctionExpression() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("extension.1.kt") + @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/functionExpression/extension.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); + doTest(fileName); } } @@ -760,19 +760,19 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class InnerClasses extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInInnerClasses() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("innerLambda.1.kt") + @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/innerLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); + doTest(fileName); } - @TestMetadata("kt10259.1.kt") + @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/kt10259.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); + doTest(fileName); } } @@ -781,19 +781,19 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class LambdaClassClash extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInLambdaClassClash() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("lambdaClassClash.1.kt") + @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); + doTest(fileName); } - @TestMetadata("noInlineLambdaX2.1.kt") + @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); + doTest(fileName); } } @@ -802,37 +802,37 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class LambdaTransformation extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInLambdaTransformation() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("lambdaCloning.1.kt") + @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); + doTest(fileName); } - @TestMetadata("lambdaInLambda2.1.kt") + @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); + doTest(fileName); } - @TestMetadata("lambdaInLambdaNoInline.1.kt") + @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); + doTest(fileName); } - @TestMetadata("regeneratedLambdaName.1.kt") + @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); + doTest(fileName); } - @TestMetadata("sameCaptured.1.kt") + @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); + doTest(fileName); } } @@ -841,13 +841,13 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunInLambda extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInLocalFunInLambda() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("localFunInLambda.1.kt") + @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); + doTest(fileName); } } @@ -856,13 +856,13 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInMultifileClasses() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("inlineFromOtherPackage.1.kt") + @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); + doTest(fileName); } } @@ -871,49 +871,49 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class NoInline extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInNoInline() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("extensionReceiver.1.kt") + @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/extensionReceiver.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); + doTest(fileName); } - @TestMetadata("lambdaAsGeneric.1.kt") + @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); + doTest(fileName); } - @TestMetadata("lambdaAsNonFunction.1.kt") + @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); + doTest(fileName); } - @TestMetadata("noInline.1.kt") + @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInline.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInline.kt"); + doTest(fileName); } - @TestMetadata("noInlineLambdaChain.1.kt") + @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); + doTest(fileName); } - @TestMetadata("noInlineLambdaChainWithCapturedInline.1.kt") + @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); + doTest(fileName); } - @TestMetadata("withoutInline.1.kt") + @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/withoutInline.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); + doTest(fileName); } } @@ -922,85 +922,85 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInNonLocalReturns() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("explicitLocalReturn.1.kt") + @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); + doTest(fileName); } - @TestMetadata("justReturnInLambda.1.kt") + @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); + doTest(fileName); } - @TestMetadata("kt5199.1.kt") + @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); + doTest(fileName); } - @TestMetadata("kt8948.1.kt") + @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); + doTest(fileName); } - @TestMetadata("kt8948v2.1.kt") + @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); + doTest(fileName); } - @TestMetadata("nestedNonLocals.1.kt") + @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); + doTest(fileName); } - @TestMetadata("noInlineLocalReturn.1.kt") + @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); + doTest(fileName); } - @TestMetadata("nonLocalReturnFromOuterLambda.1.kt") + @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); + doTest(fileName); } - @TestMetadata("propertyAccessors.1.kt") + @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); + doTest(fileName); } - @TestMetadata("returnFromFunctionExpr.1.kt") + @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); + doTest(fileName); } - @TestMetadata("simple.1.kt") + @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simple.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); + doTest(fileName); } - @TestMetadata("simpleFunctional.1.kt") + @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); + doTest(fileName); } - @TestMetadata("simpleVoid.1.kt") + @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @@ -1008,19 +1008,19 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Deparenthesize extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInDeparenthesize() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("bracket.1.kt") + @TestMetadata("bracket.kt") public void testBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); + doTest(fileName); } - @TestMetadata("labeled.1.kt") + @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); + doTest(fileName); } } @@ -1029,25 +1029,25 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class TryFinally extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInTryFinally() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("kt6956.1.kt") + @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); + doTest(fileName); } - @TestMetadata("kt7273.1.kt") + @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); + doTest(fileName); } - @TestMetadata("nonLocalReturnFromOuterLambda.1.kt") + @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @@ -1055,43 +1055,43 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class CallSite extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInCallSite() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("callSite.1.kt") + @TestMetadata("callSite.kt") public void testCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); + doTest(fileName); } - @TestMetadata("callSiteComplex.1.kt") + @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); + doTest(fileName); } - @TestMetadata("exceptionTableSplit.1.kt") + @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); + doTest(fileName); } - @TestMetadata("exceptionTableSplitNoReturn.1.kt") + @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); + doTest(fileName); } - @TestMetadata("finallyInFinally.1.kt") + @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); + doTest(fileName); } - @TestMetadata("wrongVarInterval.1.kt") + @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); + doTest(fileName); } } @@ -1100,55 +1100,55 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Chained extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInChained() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("finallyInFinally.1.kt") + @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); + doTest(fileName); } - @TestMetadata("finallyInFinally2.1.kt") + @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); + doTest(fileName); } - @TestMetadata("intReturn.1.kt") + @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); + doTest(fileName); } - @TestMetadata("intReturnComplex.1.kt") + @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); + doTest(fileName); } - @TestMetadata("intReturnComplex2.1.kt") + @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); + doTest(fileName); } - @TestMetadata("intReturnComplex3.1.kt") + @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); + doTest(fileName); } - @TestMetadata("intReturnComplex4.1.kt") + @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); + doTest(fileName); } - @TestMetadata("nestedLambda.1.kt") + @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); + doTest(fileName); } } @@ -1157,79 +1157,79 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class DeclSite extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInDeclSite() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("complex.1.kt") + @TestMetadata("complex.kt") public void testComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); + doTest(fileName); } - @TestMetadata("intReturn.1.kt") + @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); + doTest(fileName); } - @TestMetadata("intReturnComplex.1.kt") + @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); + doTest(fileName); } - @TestMetadata("longReturn.1.kt") + @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); + doTest(fileName); } - @TestMetadata("nested.1.kt") + @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); + doTest(fileName); } - @TestMetadata("returnInFinally.1.kt") + @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); + doTest(fileName); } - @TestMetadata("returnInTry.1.kt") + @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); + doTest(fileName); } - @TestMetadata("returnInTryAndFinally.1.kt") + @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); + doTest(fileName); } - @TestMetadata("severalInTry.1.kt") + @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); + doTest(fileName); } - @TestMetadata("severalInTryComplex.1.kt") + @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); + doTest(fileName); } - @TestMetadata("voidInlineFun.1.kt") + @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); + doTest(fileName); } - @TestMetadata("voidNonLocal.1.kt") + @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); + doTest(fileName); } } @@ -1238,103 +1238,103 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class ExceptionTable extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInExceptionTable() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("break.1.kt") + @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); + doTest(fileName); } - @TestMetadata("continue.1.kt") + @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); + doTest(fileName); } - @TestMetadata("exceptionInFinally.1.kt") + @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); + doTest(fileName); } - @TestMetadata("forInFinally.1.kt") + @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); + doTest(fileName); } - @TestMetadata("innerAndExternal.1.kt") + @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); + doTest(fileName); } - @TestMetadata("innerAndExternalNested.1.kt") + @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); + doTest(fileName); } - @TestMetadata("innerAndExternalSimple.1.kt") + @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); + doTest(fileName); } - @TestMetadata("nested.1.kt") + @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); + doTest(fileName); } - @TestMetadata("nestedWithReturns.1.kt") + @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); + doTest(fileName); } - @TestMetadata("nestedWithReturnsSimple.1.kt") + @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); + doTest(fileName); } - @TestMetadata("noFinally.1.kt") + @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); + doTest(fileName); } - @TestMetadata("severalCatchClause.1.kt") + @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); + doTest(fileName); } - @TestMetadata("simpleThrow.1.kt") + @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); + doTest(fileName); } - @TestMetadata("synchonized.1.kt") + @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); + doTest(fileName); } - @TestMetadata("throwInFinally.1.kt") + @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); + doTest(fileName); } - @TestMetadata("tryCatchInFinally.1.kt") + @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); + doTest(fileName); } } @@ -1343,13 +1343,13 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInVariables() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("kt7792.1.kt") + @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); + doTest(fileName); } } } @@ -1359,80 +1359,80 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractCompileKotlinAgainstInlineKotlinTest { - @TestMetadata("accessorForConst.1.kt") + @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorForConst.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); + doTest(fileName); } - @TestMetadata("accessorStability.1.kt") + @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStability.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStability.kt"); + doTest(fileName); } - @TestMetadata("accessorStabilityInClass.1.kt") + @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); + doTest(fileName); } public void testAllFilesPresentInPrivate() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("effectivePrivate.1.kt") + @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/effectivePrivate.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); + doTest(fileName); } - @TestMetadata("kt6453.1.kt") + @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt6453.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt6453.kt"); + doTest(fileName); } - @TestMetadata("kt8094.1.kt") + @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.kt"); + doTest(fileName); } - @TestMetadata("kt8095.1.kt") + @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8095.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8095.kt"); + doTest(fileName); } - @TestMetadata("nestedInPrivateClass.1.kt") + @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); + doTest(fileName); } - @TestMetadata("privateClass.1.kt") + @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClass.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClass.kt"); + doTest(fileName); } - @TestMetadata("privateClassExtensionLambda.1.kt") + @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); + doTest(fileName); } - @TestMetadata("privateInInlineInMultiFileFacade.1.kt") + @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); + doTest(fileName); } - @TestMetadata("privateInline.1.kt") + @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInline.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInline.kt"); + doTest(fileName); } } @@ -1441,73 +1441,73 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInReified() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("capturedLambda.1.kt") + @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); + doTest(fileName); } - @TestMetadata("capturedLambda2.1.kt") + @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); + doTest(fileName); } - @TestMetadata("kt11081.1.kt") + @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11081.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11081.kt"); + doTest(fileName); } - @TestMetadata("kt6988.1.kt") + @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988.kt"); + doTest(fileName); } - @TestMetadata("kt6988_2.1.kt") + @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988_2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); + doTest(fileName); } - @TestMetadata("kt6990.1.kt") + @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6990.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6990.kt"); + doTest(fileName); } - @TestMetadata("kt7017.1.kt") + @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt7017.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt7017.kt"); + doTest(fileName); } - @TestMetadata("kt8047.1.kt") + @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt8047.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt8047.kt"); + doTest(fileName); } - @TestMetadata("kt9637.1.kt") + @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637.kt"); + doTest(fileName); } - @TestMetadata("kt9637_2.1.kt") + @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637_2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); + doTest(fileName); } - @TestMetadata("packages.1.kt") + @TestMetadata("packages.kt") public void testPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/packages.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/packages.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @@ -1515,43 +1515,43 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class CheckCast extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInCheckCast() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("chain.1.kt") + @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/chain.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); + doTest(fileName); } - @TestMetadata("kt8043.1.kt") + @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); + doTest(fileName); } - @TestMetadata("maxStack.1.kt") + @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); + doTest(fileName); } - @TestMetadata("nullable.1.kt") + @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/nullable.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); + doTest(fileName); } - @TestMetadata("simple.1.kt") + @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simple.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); + doTest(fileName); } - @TestMetadata("simpleSafe.1.kt") + @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); + doTest(fileName); } } @@ -1560,25 +1560,25 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class IsCheck extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInIsCheck() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("chain.1.kt") + @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/chain.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); + doTest(fileName); } - @TestMetadata("nullable.1.kt") + @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/nullable.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); + doTest(fileName); } - @TestMetadata("simple.1.kt") + @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/simple.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); + doTest(fileName); } } } @@ -1588,61 +1588,61 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Signature extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInSignature() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("inProjectionSubstitution.1.kt") + @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); + doTest(fileName); } - @TestMetadata("outProjectionSubstitution.1.kt") + @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); + doTest(fileName); } - @TestMetadata("recursion.1.kt") + @TestMetadata("recursion.kt") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/recursion.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/recursion.kt"); + doTest(fileName); } - @TestMetadata("sameFormalParameterName.1.kt") + @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); + doTest(fileName); } - @TestMetadata("sameReifiedFormalParameterName.1.kt") + @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); + doTest(fileName); } - @TestMetadata("starProjectionSubstitution.1.kt") + @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); + doTest(fileName); } - @TestMetadata("typeParameterInLambda.1.kt") + @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); + doTest(fileName); } - @TestMetadata("typeParametersSubstitution.1.kt") + @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); + doTest(fileName); } - @TestMetadata("typeParametersSubstitution2.1.kt") + @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); + doTest(fileName); } } @@ -1651,97 +1651,97 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Simple extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInSimple() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("classObject.1.kt") + @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/classObject.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/classObject.kt"); + doTest(fileName); } - @TestMetadata("extension.1.kt") + @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extension.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extension.kt"); + doTest(fileName); } - @TestMetadata("extensionLambda.1.kt") + @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extensionLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); + doTest(fileName); } - @TestMetadata("params.1.kt") + @TestMetadata("params.kt") public void testParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/params.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/params.kt"); + doTest(fileName); } - @TestMetadata("rootConstructor.1.kt") + @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/rootConstructor.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); + doTest(fileName); } - @TestMetadata("safeCall.1.kt") + @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/safeCall.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/safeCall.kt"); + doTest(fileName); } - @TestMetadata("severalClosures.1.kt") + @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalClosures.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); + doTest(fileName); } - @TestMetadata("severalUsage.1.kt") + @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalUsage.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); + doTest(fileName); } - @TestMetadata("simpleDouble.1.kt") + @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleDouble.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); + doTest(fileName); } - @TestMetadata("simpleEnum.1.kt") + @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleEnum.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); + doTest(fileName); } - @TestMetadata("simpleGenerics.1.kt") + @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleGenerics.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); + doTest(fileName); } - @TestMetadata("simpleInt.1.kt") + @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleInt.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); + doTest(fileName); } - @TestMetadata("simpleLambda.1.kt") + @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleLambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); + doTest(fileName); } - @TestMetadata("simpleObject.1.kt") + @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleObject.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); + doTest(fileName); } - @TestMetadata("vararg.1.kt") + @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/vararg.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/vararg.kt"); + doTest(fileName); } } @@ -1750,31 +1750,31 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Smap extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInSmap() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("assertion.1.kt") + @TestMetadata("assertion.kt") public void testAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/assertion.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/assertion.kt"); + doTest(fileName); } - @TestMetadata("classFromDefaultPackage.1.kt") + @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); + doTest(fileName); } - @TestMetadata("oneFile.1.kt") + @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.kt"); + doTest(fileName); } - @TestMetadata("smap.1.kt") + @TestMetadata("smap.kt") public void testSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/smap.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/smap.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @@ -1782,55 +1782,55 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Anonymous extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInAnonymous() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("lambda.1.kt") + @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambda.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); + doTest(fileName); } - @TestMetadata("lambdaOnCallSite.1.kt") + @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); + doTest(fileName); } - @TestMetadata("lambdaOnInlineCallSite.1.kt") + @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); + doTest(fileName); } - @TestMetadata("object.1.kt") + @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/object.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); + doTest(fileName); } - @TestMetadata("objectOnCallSite.1.kt") + @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); + doTest(fileName); } - @TestMetadata("objectOnInlineCallSite.1.kt") + @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); + doTest(fileName); } - @TestMetadata("objectOnInlineCallSite2.1.kt") + @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); + doTest(fileName); } - @TestMetadata("objectOnInlineCallSiteWithCapture.1.kt") + @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); + doTest(fileName); } } @@ -1839,19 +1839,19 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class InlineOnly extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInInlineOnly() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("noSmap.1.kt") + @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); + doTest(fileName); } - @TestMetadata("reified.1.kt") + @TestMetadata("reified.kt") public void testReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); + doTest(fileName); } } @@ -1860,19 +1860,19 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInResolve() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("inlineComponent.1.kt") + @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); + doTest(fileName); } - @TestMetadata("inlineIterator.1.kt") + @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); + doTest(fileName); } } } @@ -1882,43 +1882,43 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Special extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInSpecial() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("identityCheck.1.kt") + @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/identityCheck.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/identityCheck.kt"); + doTest(fileName); } - @TestMetadata("ifBranches.1.kt") + @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/ifBranches.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/ifBranches.kt"); + doTest(fileName); } - @TestMetadata("iinc.1.kt") + @TestMetadata("iinc.kt") public void testIinc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/iinc.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/iinc.kt"); + doTest(fileName); } - @TestMetadata("inlineChain.1.kt") + @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/inlineChain.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/inlineChain.kt"); + doTest(fileName); } - @TestMetadata("plusAssign.1.kt") + @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/plusAssign.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/plusAssign.kt"); + doTest(fileName); } - @TestMetadata("stackHeightBug.1.kt") + @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/stackHeightBug.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); + doTest(fileName); } } @@ -1927,49 +1927,49 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAccessors extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInSyntheticAccessors() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("constField.1.kt") + @TestMetadata("constField.kt") public void testConstField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/constField.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); + doTest(fileName); } - @TestMetadata("packagePrivateMembers.1.kt") + @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); + doTest(fileName); } - @TestMetadata("propertyModifiers.1.kt") + @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); + doTest(fileName); } - @TestMetadata("protectedMembers.1.kt") + @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); + doTest(fileName); } - @TestMetadata("protectedMembersFromSuper.1.kt") + @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); + doTest(fileName); } - @TestMetadata("superCall.1.kt") + @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); + doTest(fileName); } - @TestMetadata("superProperty.1.kt") + @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); + doTest(fileName); } @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @@ -1977,43 +1977,43 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class WithinInlineLambda extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInWithinInlineLambda() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("directFieldAccess.1.kt") + @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); + doTest(fileName); } - @TestMetadata("directFieldAccessInCrossInline.1.kt") + @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); + doTest(fileName); } - @TestMetadata("privateCall.1.kt") + @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); + doTest(fileName); } - @TestMetadata("privateInCrossInline.1.kt") + @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); + doTest(fileName); } - @TestMetadata("superCall.1.kt") + @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); + doTest(fileName); } - @TestMetadata("superInCrossInline.1.kt") + @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); + doTest(fileName); } } } @@ -2023,13 +2023,13 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInTrait() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("trait.1.kt") + @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/trait/trait.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/trait/trait.kt"); + doTest(fileName); } } @@ -2038,31 +2038,31 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchFinally extends AbstractCompileKotlinAgainstInlineKotlinTest { public void testAllFilesPresentInTryCatchFinally() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.1.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("kt5863.1.kt") + @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); + doTest(fileName); } - @TestMetadata("tryCatch.1.kt") + @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); + doTest(fileName); } - @TestMetadata("tryCatch2.1.kt") + @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); + doTest(fileName); } - @TestMetadata("tryCatchFinally.1.kt") + @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.1.kt"); - doBoxTestWithInlineCheck(fileName); + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); + doTest(fileName); } } } diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 50fd14a7b04..01f0f52ae09 100644 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -196,11 +196,11 @@ fun main(args: Array) { } testClass("BlackBoxInlineCodegenTestGenerated") { - model("codegen/boxInline", extension = "1.kt", testMethod = "doTestMultiFileWithInlineCheck") + model("codegen/boxInline") } testClass("CompileKotlinAgainstInlineKotlinTestGenerated") { - model("codegen/boxInline", extension = "1.kt", testMethod = "doBoxTestWithInlineCheck") + model("codegen/boxInline") } testClass("BlackBoxMultiFileCodegenTestGenerated") {