From 24aee1cce313f7b982bec8a599d3441b8cfee7ce Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 1 Sep 2020 20:27:01 +0200 Subject: [PATCH] JVM IR: unmute tests on anonymous objects in inline lambdas All tests on anonymous objects should use the NO_CHECK_LAMBDA_INLINING directive, since the test framework can't tell an anonymous object from a lambda and checking that anonymous objects are "inlined" makes no sense. --- .../boxInline/anonymousObject/anonymousObjectInDefault.kt | 5 +++-- .../codegen/boxInline/anonymousObject/capturedLocalFun.kt | 5 +++-- .../boxInline/anonymousObject/capturedLocalFunRef.kt | 5 ++--- .../codegen/boxInline/anonymousObject/functionExpression.kt | 6 ++---- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectInDefault.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectInDefault.kt index 16b4745cd82..4e61ed1f431 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectInDefault.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectInDefault.kt @@ -1,5 +1,6 @@ // IGNORE_BACKEND: JVM -// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_IR +// IGNORE_BACKEND_MULTI_MODULE: JVM +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -28,4 +29,4 @@ class A(val x: String, f: () -> IFoo = { fun box(): String { return A("O").foo.foo() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFun.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFun.kt index d41efab287b..554a4996cbe 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFun.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFun.kt @@ -1,5 +1,6 @@ // IGNORE_BACKEND: JVM -// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_IR +// IGNORE_BACKEND_MULTI_MODULE: JVM +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -21,4 +22,4 @@ fun box(): String { o } return x.bar() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt index e637e448eba..2599fdc2b95 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt @@ -1,5 +1,4 @@ -// IGNORE_BACKEND: JVM -// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_IR +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -21,4 +20,4 @@ fun box(): String { o } return x.bar() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/functionExpression.kt b/compiler/testData/codegen/boxInline/anonymousObject/functionExpression.kt index f77cb93d15f..93ebc35cc62 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/functionExpression.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/functionExpression.kt @@ -1,6 +1,4 @@ -// IGNORE_BACKEND: JVM -// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_IR - +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -28,4 +26,4 @@ fun bar(): Int { }.compute() } -fun box() = if (bar() == 42) "OK" else "fail" \ No newline at end of file +fun box() = if (bar() == 42) "OK" else "fail"