From ba20549e13e645edcf4dd99e9cb2b4ad80da666e Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Fri, 6 May 2022 03:47:25 +0200 Subject: [PATCH] Fix JVM target in tests using boolean comparisons These tests don't work on JVM target 1.6 after 6d664bcd10 because we're generating `Boolean.compare` which is only available since 1.8. (It is not a big deal because JVM target 1.6 is prohibited for users now.) --- compiler/testData/codegen/box/delegation/kt30102_comparable.kt | 1 + compiler/testData/codegen/box/intrinsics/kt52163_boolean.kt | 2 ++ .../codegen/box/operatorConventions/compareTo/boolean.kt | 2 ++ 3 files changed, 5 insertions(+) diff --git a/compiler/testData/codegen/box/delegation/kt30102_comparable.kt b/compiler/testData/codegen/box/delegation/kt30102_comparable.kt index 13230184f69..3eda2a5cb21 100644 --- a/compiler/testData/codegen/box/delegation/kt30102_comparable.kt +++ b/compiler/testData/codegen/box/delegation/kt30102_comparable.kt @@ -1,3 +1,4 @@ +// JVM_TARGET: 1.8 // IGNORE_BACKEND: JVM fun box(): String { diff --git a/compiler/testData/codegen/box/intrinsics/kt52163_boolean.kt b/compiler/testData/codegen/box/intrinsics/kt52163_boolean.kt index 93696c55df0..29665a0bb58 100644 --- a/compiler/testData/codegen/box/intrinsics/kt52163_boolean.kt +++ b/compiler/testData/codegen/box/intrinsics/kt52163_boolean.kt @@ -1,3 +1,5 @@ +// JVM_TARGET: 1.8 + fun test(): Int { val d: Any? d = true diff --git a/compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt b/compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt index 833e11a733a..2fd55adb7a8 100644 --- a/compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt +++ b/compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt @@ -1,3 +1,5 @@ +// JVM_TARGET: 1.8 + fun checkLess(x: Boolean, y: Boolean) = when { x >= y -> "Fail $x >= $y" !(x < y) -> "Fail !($x < $y)"