From ea0d0097ba559bfc442b5ab4489e5a4463ef0bd2 Mon Sep 17 00:00:00 2001 From: "Denis.Zharkov" Date: Fri, 11 Aug 2023 08:59:26 +0200 Subject: [PATCH] Fix `testSelfUpperBoundInference` test in LV 2.0 branch The test starts failing after switching to 2.0 because we don't support TypeInferenceOnCallsWithSelfTypes though it's planned (see KT-59012). This particular test was introduced in 1.5.x (see KT-48026) to check if the flag -Xself-upper-bound-inference actually enables the feature TypeInferenceOnCallsWithSelfTypes. While the feature is enabled by default since 1.6, it doesn't make sense to have it with earlier versions. Another solution would be removing it at all, but that might require removing related code as well (as we would have some dead code in CLI arguments processing). ^KT-60885 Fixed --- compiler/testData/cli/jvm/selfUpperBoundInference.args | 2 ++ compiler/testData/cli/jvm/selfUpperBoundInference.out | 1 + 2 files changed, 3 insertions(+) diff --git a/compiler/testData/cli/jvm/selfUpperBoundInference.args b/compiler/testData/cli/jvm/selfUpperBoundInference.args index 98b8d8af4e1..6664837e8ef 100644 --- a/compiler/testData/cli/jvm/selfUpperBoundInference.args +++ b/compiler/testData/cli/jvm/selfUpperBoundInference.args @@ -1,4 +1,6 @@ $TESTDATA_DIR$/selfUpperBoundInference.kt -d $TEMP_DIR$ +-language-version +1.5 -Xself-upper-bound-inference diff --git a/compiler/testData/cli/jvm/selfUpperBoundInference.out b/compiler/testData/cli/jvm/selfUpperBoundInference.out index 307db53fa5a..cdd8941e43f 100644 --- a/compiler/testData/cli/jvm/selfUpperBoundInference.out +++ b/compiler/testData/cli/jvm/selfUpperBoundInference.out @@ -1,3 +1,4 @@ +warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin compiler/testData/cli/jvm/selfUpperBoundInference.kt:40:25: warning: unchecked cast: WriterAppender.Builder1 to B return this as B ^