Compiler: restore an opportunity to switch light tree mode OFF
#KT-55996 Fixed
This commit is contained in:
committed by
Space Team
parent
5aef179a3d
commit
c8db20bd0b
@@ -46,7 +46,7 @@ fun <A : CommonCompilerArguments> CompilerConfiguration.setupCommonArguments(
|
|||||||
|
|
||||||
val usesK2 = arguments.useK2 || languageVersionSettings.languageVersion.usesK2
|
val usesK2 = arguments.useK2 || languageVersionSettings.languageVersion.usesK2
|
||||||
put(CommonConfigurationKeys.USE_FIR, usesK2)
|
put(CommonConfigurationKeys.USE_FIR, usesK2)
|
||||||
put(CommonConfigurationKeys.USE_LIGHT_TREE, usesK2)
|
put(CommonConfigurationKeys.USE_LIGHT_TREE, arguments.useFirLT)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <A : CommonCompilerArguments> CompilerConfiguration.setupLanguageVersionSettings(arguments: A) {
|
fun <A : CommonCompilerArguments> CompilerConfiguration.setupLanguageVersionSettings(arguments: A) {
|
||||||
|
|||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
fun List<String>.test() {
|
||||||
|
this += "Alpha"
|
||||||
|
java.lang.System = null
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
$TESTDATA_DIR$/firLightTree.kt
|
||||||
|
-language-version
|
||||||
|
2.0
|
||||||
|
-Xuse-fir-lt=false
|
||||||
|
-d
|
||||||
|
$TEMP_DIR$
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
|
||||||
|
compiler/testData/cli/jvm/firLightTree.kt:2:5: error: variable expected
|
||||||
|
this += "Alpha"
|
||||||
|
^
|
||||||
|
compiler/testData/cli/jvm/firLightTree.kt:3:15: error: classifier 'class System : Any' does not have a companion object, and thus must be initialized here
|
||||||
|
java.lang.System = null
|
||||||
|
^
|
||||||
|
COMPILATION_ERROR
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
$TESTDATA_DIR$/firLightTree.kt
|
||||||
|
-language-version
|
||||||
|
2.0
|
||||||
|
-Xuse-fir-lt=true
|
||||||
|
-d
|
||||||
|
$TEMP_DIR$
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
|
||||||
|
compiler/testData/cli/jvm/firLightTree.kt:3:5: error: classifier 'class System : Any' does not have a companion object, and thus must be initialized here
|
||||||
|
java.lang.System = null
|
||||||
|
^
|
||||||
|
COMPILATION_ERROR
|
||||||
@@ -462,6 +462,16 @@ public class CliTestGenerated extends AbstractCliTest {
|
|||||||
runTest("compiler/testData/cli/jvm/firHello20WithOldLV.args");
|
runTest("compiler/testData/cli/jvm/firHello20WithOldLV.args");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("firLightTreeOff.args")
|
||||||
|
public void testFirLightTreeOff() throws Exception {
|
||||||
|
runTest("compiler/testData/cli/jvm/firLightTreeOff.args");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("firLightTreeOn.args")
|
||||||
|
public void testFirLightTreeOn() throws Exception {
|
||||||
|
runTest("compiler/testData/cli/jvm/firLightTreeOn.args");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("firMultiplatformCompilationWithError.args")
|
@TestMetadata("firMultiplatformCompilationWithError.args")
|
||||||
public void testFirMultiplatformCompilationWithError() throws Exception {
|
public void testFirMultiplatformCompilationWithError() throws Exception {
|
||||||
runTest("compiler/testData/cli/jvm/firMultiplatformCompilationWithError.args");
|
runTest("compiler/testData/cli/jvm/firMultiplatformCompilationWithError.args");
|
||||||
|
|||||||
Reference in New Issue
Block a user