Migrate boxInline tests to new multi-file framework

This commit is contained in:
Alexander Udalov
2016-02-24 13:29:32 +03:00
committed by Alexander Udalov
parent fa1f7d988e
commit cc84aabdcf
586 changed files with 6946 additions and 5639 deletions
@@ -1,12 +0,0 @@
package test
abstract class A<R> {
abstract fun getO() : R
abstract fun getK() : R
}
inline fun <R> doWork(job: ()-> R) : R {
return job()
}
@@ -1,3 +1,20 @@
// FILE: 1.kt
package test
abstract class A<R> {
abstract fun getO() : R
abstract fun getK() : R
}
inline fun <R> doWork(job: ()-> R) : R {
return job()
}
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING //NO_CHECK_LAMBDA_INLINING
import test.* import test.*
@@ -26,4 +43,3 @@ fun box() : String {
return "OK" return "OK"
} }
@@ -1,12 +0,0 @@
package test
abstract class A<R>(val param: R) {
abstract fun getO() : R
abstract fun getK() : R
}
inline fun <R> doWork(job: ()-> R) : R {
return job()
}
@@ -1,3 +1,20 @@
// FILE: 1.kt
package test
abstract class A<R>(val param: R) {
abstract fun getO() : R
abstract fun getK() : R
}
inline fun <R> doWork(job: ()-> R) : R {
return job()
}
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING //NO_CHECK_LAMBDA_INLINING
import test.* import test.*
@@ -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"
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
@@ -48,3 +50,36 @@ inline fun <R> doWorkInConstructor(crossinline jobO: ()-> R, crossinline jobK: (
} }
return s; return s;
} }
// 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"
}
@@ -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"
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
@@ -35,3 +37,36 @@ inline fun <R> doWorkInConstructor(crossinline jobO: ()-> R, crossinline jobK: (
} }
return s; return s;
} }
// 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"
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return bar {"OK"} ()
}
@@ -1,7 +0,0 @@
package test
inline fun bar(crossinline y: () -> String) = {
call(y)
}
public inline fun <T> call(f: () -> T): T = f()
@@ -0,0 +1,18 @@
// FILE: 1.kt
package test
inline fun bar(crossinline y: () -> String) = {
call(y)
}
public inline fun <T> call(f: () -> T): T = f()
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return bar {"OK"} ()
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return bar {"OK"} ()
}
@@ -1,7 +0,0 @@
package test
inline fun bar(crossinline y: () -> String) = {
{ { call(y) }() }()
}
public inline fun <T> call(f: () -> T): T = f()
@@ -0,0 +1,18 @@
// FILE: 1.kt
package test
inline fun bar(crossinline y: () -> String) = {
{ { call(y) }() }()
}
public inline fun <T> call(f: () -> T): T = f()
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return bar {"OK"} ()
}
@@ -1,7 +0,0 @@
package test
inline fun bar(crossinline y: () -> String) = {
{ { call(y) }() }()
}
public inline fun <T> call(crossinline f: () -> T): T = {{ f() }()}()
@@ -1,3 +1,15 @@
// FILE: 1.kt
package test
inline fun bar(crossinline y: () -> String) = {
{ { call(y) }() }()
}
public inline fun <T> call(crossinline f: () -> T): T = {{ f() }()}()
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING //NO_CHECK_LAMBDA_INLINING
import test.* import test.*
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return bar { "OK" }.run()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
internal interface A<T> { internal interface A<T> {
@@ -15,3 +17,12 @@ public inline fun <T> call(crossinline f: () -> T): T = object : A<T> {
return f() return f()
} }
}.run() }.run()
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return bar { "OK" }.run()
}
@@ -1,7 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
//KT-7490
import test.*
fun box(): String {
return Entity("OK").directed().calc().value
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
open class Entity(val value: String) open class Entity(val value: String)
@@ -16,3 +18,13 @@ inline fun<reified Self : Entity> Self.directed(): Task<Self> =
override fun calc(): Self = this@directed override fun calc(): Self = this@directed
} }
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
//KT-7490
import test.*
fun box(): String {
return Entity("OK").directed().calc().value
}
@@ -1,5 +0,0 @@
import test.*
fun box(): String {
return A().doSomething().run()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
interface Run { interface Run {
@@ -11,3 +13,11 @@ internal class A {
} }
} }
} }
// FILE: 2.kt
import test.*
fun box(): String {
return A().doSomething().run()
}
@@ -1,5 +0,0 @@
import test.*
fun box(): String {
return A().doSomething()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
internal class A { internal class A {
@@ -7,3 +9,11 @@ internal class A {
}() }()
} }
} }
// FILE: 2.kt
import test.*
fun box(): String {
return A().doSomething()
}
@@ -1,5 +0,0 @@
import test.*
fun box(): String {
return A().doSomething("OK")
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
internal class A { internal class A {
@@ -7,3 +9,11 @@ internal class A {
}() }()
} }
} }
// FILE: 2.kt
import test.*
fun box(): String {
return A().doSomething("OK")
}
@@ -1,5 +0,0 @@
import test.*
fun box(): String {
return switch(X.A) + switch(X.B)
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
public enum class X { A, B } public enum class X { A, B }
@@ -6,3 +8,11 @@ public inline fun switch(x: X): String = when (x) {
X.A -> "O" X.A -> "O"
X.B -> "K" X.B -> "K"
} }
// FILE: 2.kt
import test.*
fun box(): String {
return switch(X.A) + switch(X.B)
}
@@ -1,3 +0,0 @@
package test
public inline fun <T, R> T.myLet(f: (T) -> R): R = f(this)
@@ -1,3 +1,11 @@
// FILE: 1.kt
package test
public inline fun <T, R> T.myLet(f: (T) -> R): R = f(this)
// FILE: 2.kt
import test.* import test.*
interface foo { interface foo {
@@ -1,9 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
val test = Test("OK")
return test._parameter.property
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class Test(val _member: String) { class Test(val _member: String) {
@@ -15,3 +17,15 @@ interface Z {
inline fun test(s: () -> Z): Z { inline fun test(s: () -> Z): Z {
return s() return s()
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
val test = Test("OK")
return test._parameter.property
}
@@ -1,9 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
val test = Test("OK")
return test._parameter.property.property
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class Test(val _member: String) { class Test(val _member: String) {
@@ -19,3 +21,15 @@ interface Z<T> {
inline fun <T> test(s: () -> Z<T>): Z<T> { inline fun <T> test(s: () -> Z<T>): Z<T> {
return s() return s()
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
val test = Test("OK")
return test._parameter.property.property
}
@@ -1,7 +0,0 @@
package test
inline fun inlineFun(p: () -> Unit) {
p()
}
@@ -1,3 +1,15 @@
// FILE: 1.kt
package test
inline fun inlineFun(p: () -> Unit) {
p()
}
// FILE: 2.kt
import test.* import test.*
public fun box(): String { public fun box(): String {
@@ -1,10 +0,0 @@
package test
fun <T> T.noInline(p: (T) -> Unit) {
p(this)
}
inline fun inlineCall(p: () -> Unit) {
p()
}
@@ -1,3 +1,17 @@
// FILE: 1.kt
package test
fun <T> T.noInline(p: (T) -> Unit) {
p(this)
}
inline fun inlineCall(p: () -> Unit) {
p()
}
// FILE: 2.kt
import test.* import test.*
fun box(): String { fun box(): String {
@@ -1,6 +0,0 @@
package test
inline fun inlineCall(p: () -> Unit) {
p()
}
@@ -1,3 +1,13 @@
// FILE: 1.kt
package test
inline fun inlineCall(p: () -> Unit) {
p()
}
// FILE: 2.kt
import test.* import test.*
fun box(): String { fun box(): String {
@@ -1,7 +0,0 @@
import test.*
fun box(): String {
var result = "fail"
test { it -> result = it }
return result
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
interface A { interface A {
@@ -16,3 +18,12 @@ inline fun test(crossinline f: (String) -> Unit) {
testNested { it -> { f(it) }()} testNested { it -> { f(it) }()}
} }
// FILE: 2.kt
import test.*
fun box(): String {
var result = "fail"
test { it -> result = it }
return result
}
@@ -1,5 +0,0 @@
package test
inline fun <T> inlineFun(arg: T, f: (T) -> Unit) {
f(arg)
}
@@ -1,3 +1,13 @@
// FILE: 1.kt
package test
inline fun <T> inlineFun(arg: T, f: (T) -> Unit) {
f(arg)
}
// FILE: 2.kt
import test.* import test.*
fun box(): String { fun box(): String {
@@ -1,7 +0,0 @@
package test
inline fun <T> inlineFun(arg: T, crossinline f: (T) -> Unit) {
{
f(arg)
}()
}
@@ -1,3 +1,15 @@
// FILE: 1.kt
package test
inline fun <T> inlineFun(arg: T, crossinline f: (T) -> Unit) {
{
f(arg)
}()
}
// FILE: 2.kt
import test.* import test.*
fun box(): String { fun box(): String {
@@ -1,7 +0,0 @@
package test
inline fun <T> inlineFun(arg: T, crossinline f: (T) -> Unit) {
{
f(arg)
}()
}
@@ -1,3 +1,15 @@
// FILE: 1.kt
package test
inline fun <T> inlineFun(arg: T, crossinline f: (T) -> Unit) {
{
f(arg)
}()
}
// FILE: 2.kt
import test.* import test.*
fun box(): String { fun box(): String {
@@ -1,7 +0,0 @@
package test
inline fun <T> inlineFun(arg: T, crossinline f: (T) -> Unit) {
{
f(arg)
}()
}
@@ -1,3 +1,15 @@
// FILE: 1.kt
package test
inline fun <T> inlineFun(arg: T, crossinline f: (T) -> Unit) {
{
f(arg)
}()
}
// FILE: 2.kt
import test.* import test.*
fun box(): String { fun box(): String {
@@ -1,7 +0,0 @@
import test.*
fun box(): String {
var result = "fail"
test { it -> result = it }
return result
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
interface A { interface A {
@@ -16,3 +18,12 @@ fun test(f: (String) -> Unit) {
testNested { it -> { f(it) }()} testNested { it -> { f(it) }()}
} }
// FILE: 2.kt
import test.*
fun box(): String {
var result = "fail"
test { it -> result = it }
return result
}
@@ -1,7 +0,0 @@
import test.*
fun box(): String {
var result = "fail"
B("O", "K").test { it -> result = it }
return result
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
interface A { interface A {
@@ -20,3 +22,13 @@ class B(val o: String, val k: String) {
} }
// FILE: 2.kt
import test.*
fun box(): String {
var result = "fail"
B("O", "K").test { it -> result = it }
return result
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class A { class A {
@@ -28,3 +30,12 @@ class A {
return if (result == "start1_additional_2_additional_") "OK" else "fail: $result" return if (result == "start1_additional_2_additional_") "OK" else "fail: $result"
} }
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class A { class A {
@@ -26,3 +28,12 @@ class A {
} }
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class A { class A {
@@ -22,3 +24,12 @@ class A {
} }
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class A { class A {
@@ -24,3 +26,12 @@ class A {
} }
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class A { class A {
@@ -27,3 +29,12 @@ class A {
return if (result == "start1_additional_2_additional_") "OK" else "fail: $result" return if (result == "start1_additional_2_additional_") "OK" else "fail: $result"
} }
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class A { class A {
@@ -27,3 +29,12 @@ class A {
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().box()
}
@@ -1,7 +0,0 @@
import test.*
fun box(): String {
var result = "fail"
B("O", "fail").test { it -> result = it }
return result
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
interface A { interface A {
@@ -19,3 +21,13 @@ class B(val o: String, val k: String) {
} }
} }
// FILE: 2.kt
import test.*
fun box(): String {
var result = "fail"
B("O", "fail").test { it -> result = it }
return result
}
@@ -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
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
interface A { interface A {
@@ -20,3 +22,14 @@ class B(val o: String, val k: String) {
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
var result = "fail"
B("O", "K").test { it -> result = it }
return result
}
@@ -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"
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
interface A { interface A {
@@ -20,3 +22,13 @@ class B(val o: String, val k: String) {
} }
} }
// 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"
}
@@ -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"
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
interface A { interface A {
@@ -29,3 +31,13 @@ class B(val o: String, val k: String) {
} }
// 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"
}
@@ -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"
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
interface A { interface A {
@@ -30,3 +32,13 @@ class B(val o: String, val k: String) {
} }
// 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"
}
@@ -1,10 +0,0 @@
import test.*
fun box(): String {
var result = "fail"
W("OK").safe {
result = this as String
}
return result
}
@@ -1,10 +0,0 @@
package test
class W(val value: Any)
inline fun W.safe(crossinline body : Any.() -> Unit) {
{
this.value?.body()
}()
}
@@ -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
}
@@ -1,12 +0,0 @@
import test.*
fun box(): String {
var result = "fail"
W("OK").safe {
{
result = this as String
}()
}
return result
}
@@ -1,10 +0,0 @@
package test
class W(val value: Any)
inline fun W.safe(crossinline body : Any.() -> Unit) {
{
this.value?.body()
}()
}
@@ -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
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().testCall()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class A { class A {
@@ -18,3 +20,12 @@ class A {
}() }()
} }
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return A().testCall()
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return Person("OK").sayName()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class Person(val name: String) { class Person(val name: String) {
@@ -13,3 +15,11 @@ class Person(val name: String) {
inline fun nestedSayName2(call: () -> String) = call() inline fun nestedSayName2(call: () -> String) = call()
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return Person("OK").sayName()
}
@@ -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"
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class Person(val name: String) { class Person(val name: String) {
@@ -12,3 +14,15 @@ class Person(val name: String) {
inline fun nestedSayName2(call: () -> String) = name + call() 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"
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return Company("OK").sayName()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
class Company(val name: String) { class Company(val name: String) {
@@ -15,3 +17,12 @@ class Person(val name: String) {
fun companyName(call: () -> String) = call() fun companyName(call: () -> String) = call()
} }
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return Company("OK").sayName()
}
@@ -1,6 +0,0 @@
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return Person("OK").sayName()
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test package test
fun Person.sayName() = doSayName { name } fun Person.sayName() = doSayName { name }
@@ -12,3 +14,11 @@ inline fun Person.parsonName(call: () -> String) = call()
fun Person.companyName(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()
}
@@ -1,5 +0,0 @@
package test
inline fun test(a: Int, b: Long, crossinline c: () -> String): String {
return { "${a}_${b}_${c()}"} ()
}
@@ -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.* import test.*
fun box(): String { fun box(): String {
@@ -1,6 +0,0 @@
package test
inline fun Double.test(a: Int, b: Long, crossinline c: () -> String): String {
return { "${this}_${a}_${b}_${c()}"} ()
}
@@ -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.* import test.*
fun box(): String { fun box(): String {
@@ -1,5 +0,0 @@
package test
inline fun Double.test(a: Int, b: Long, c: () -> String): String {
return "${this}_${a}_${b}_${c()}"
}
@@ -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.* import test.*
fun box(): String { fun box(): String {
@@ -1,7 +0,0 @@
package test
class Z {
inline fun Double.test(a: Int, b: Long, c: () -> String): String {
return "${this}_${a}_${b}_${c()}"
}
}
@@ -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.* import test.*
fun box(): String { fun box(): String {

Some files were not shown because too many files have changed in this diff Show More