From 605cdcd8d880cd9c587255a47b3912cf0ddc18a0 Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Fri, 15 Jun 2018 12:26:55 +0300 Subject: [PATCH] Allow to use inline classes in 1.3 with warning --- compiler/testData/cli/jvm/internalArgDisableLanguageFeature.out | 2 +- compiler/testData/cli/jvm/internalArgEmptyFeatureName.out | 2 +- compiler/testData/cli/jvm/internalArgMissingModificator.out | 2 +- compiler/testData/cli/jvm/internalArgUnrecognizedFeature.out | 2 +- compiler/testData/cli/jvm/internalArgWrongPrefix.out | 2 +- .../src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/testData/cli/jvm/internalArgDisableLanguageFeature.out b/compiler/testData/cli/jvm/internalArgDisableLanguageFeature.out index 21e12da51c6..df4112bf9f2 100644 --- a/compiler/testData/cli/jvm/internalArgDisableLanguageFeature.out +++ b/compiler/testData/cli/jvm/internalArgDisableLanguageFeature.out @@ -8,7 +8,7 @@ as no stability/compatibility guarantees are given on compiler or generated code. Use it at your own risk! warning: language version 1.3 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/inlineClass.kt:1:1: error: the feature "inline classes" is experimental and should be enabled explicitly +compiler/testData/cli/jvm/inlineClass.kt:1:1: error: the feature "inline classes" is disabled inline class Foo(val x: Int) ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/internalArgEmptyFeatureName.out b/compiler/testData/cli/jvm/internalArgEmptyFeatureName.out index 9c2a1e3c1a8..43bf7e500ee 100644 --- a/compiler/testData/cli/jvm/internalArgEmptyFeatureName.out +++ b/compiler/testData/cli/jvm/internalArgEmptyFeatureName.out @@ -8,7 +8,7 @@ as no stability/compatibility guarantees are given on compiler or generated code. Use it at your own risk! warning: empty language feature name for internal argument '-XXLanguage:+' -compiler/testData/cli/jvm/inlineClass.kt:1:1: error: the feature "inline classes" is experimental and should be enabled explicitly +compiler/testData/cli/jvm/inlineClass.kt:1:1: error: the feature "inline classes" is only available since language version 1.3 inline class Foo(val x: Int) ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/internalArgMissingModificator.out b/compiler/testData/cli/jvm/internalArgMissingModificator.out index e8ec00c3208..3a029a6a759 100644 --- a/compiler/testData/cli/jvm/internalArgMissingModificator.out +++ b/compiler/testData/cli/jvm/internalArgMissingModificator.out @@ -8,7 +8,7 @@ as no stability/compatibility guarantees are given on compiler or generated code. Use it at your own risk! warning: incorrect internal argument syntax, missing modificator: -XXLanguage:InlineClasses -compiler/testData/cli/jvm/inlineClass.kt:1:1: error: the feature "inline classes" is experimental and should be enabled explicitly +compiler/testData/cli/jvm/inlineClass.kt:1:1: error: the feature "inline classes" is only available since language version 1.3 inline class Foo(val x: Int) ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/internalArgUnrecognizedFeature.out b/compiler/testData/cli/jvm/internalArgUnrecognizedFeature.out index 0f250a38c60..4e93b7c3f04 100644 --- a/compiler/testData/cli/jvm/internalArgUnrecognizedFeature.out +++ b/compiler/testData/cli/jvm/internalArgUnrecognizedFeature.out @@ -8,7 +8,7 @@ as no stability/compatibility guarantees are given on compiler or generated code. Use it at your own risk! warning: unknown language feature 'UnknownFeature' in passed internal argument '-XXLanguage:+UnknownFeature' -compiler/testData/cli/jvm/inlineClass.kt:1:1: error: the feature "inline classes" is experimental and should be enabled explicitly +compiler/testData/cli/jvm/inlineClass.kt:1:1: error: the feature "inline classes" is only available since language version 1.3 inline class Foo(val x: Int) ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/internalArgWrongPrefix.out b/compiler/testData/cli/jvm/internalArgWrongPrefix.out index 75b3f45ce91..14002b097d7 100644 --- a/compiler/testData/cli/jvm/internalArgWrongPrefix.out +++ b/compiler/testData/cli/jvm/internalArgWrongPrefix.out @@ -1,5 +1,5 @@ warning: flag is not supported by this version of the compiler: -XX:+InlineClasses -compiler/testData/cli/jvm/inlineClass.kt:1:1: error: the feature "inline classes" is experimental and should be enabled explicitly +compiler/testData/cli/jvm/inlineClass.kt:1:1: error: the feature "inline classes" is only available since language version 1.3 inline class Foo(val x: Int) ^ COMPILATION_ERROR diff --git a/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt b/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt index a67fc57f171..e0b72bcf18b 100644 --- a/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt +++ b/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt @@ -93,7 +93,7 @@ enum class LanguageFeature( SamConversionForKotlinFunctions(sinceVersion = KOTLIN_1_3, defaultState = State.DISABLED), - InlineClasses(sinceVersion = null, defaultState = State.DISABLED, kind = UNSTABLE_FEATURE), + InlineClasses(sinceVersion = KOTLIN_1_3, defaultState = State.ENABLED_WITH_WARNING, kind = UNSTABLE_FEATURE), ;