Compiler: restore an opportunity to switch light tree mode OFF

#KT-55996 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-01-18 09:16:35 +01:00
committed by Space Team
parent 5aef179a3d
commit c8db20bd0b
7 changed files with 40 additions and 1 deletions
+4
View File
@@ -0,0 +1,4 @@
fun List<String>.test() {
this += "Alpha"
java.lang.System = null
}
+6
View File
@@ -0,0 +1,6 @@
$TESTDATA_DIR$/firLightTree.kt
-language-version
2.0
-Xuse-fir-lt=false
-d
$TEMP_DIR$
+8
View File
@@ -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
+6
View File
@@ -0,0 +1,6 @@
$TESTDATA_DIR$/firLightTree.kt
-language-version
2.0
-Xuse-fir-lt=true
-d
$TEMP_DIR$
+5
View File
@@ -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