[FE] Drop ApproximateIntegerLiteralTypesInReceiverPosition language feature

This feature is not needed because it is unconditionally disabled for K1
  (because of not fully correct implementation) and unconditionally enabled
  in K2 (K2 does not support old behavior)

^KT-38895
This commit is contained in:
Dmitriy Novozhilov
2022-11-30 12:22:09 +02:00
committed by Space Team
parent 26ff806440
commit 3cffb33ab7
90 changed files with 90 additions and 494 deletions
@@ -1,4 +1,4 @@
$TESTDATA_DIR$/overridingXx.kt
-d
$TEMP_DIR$
-XXLanguage\:+ApproximateIntegerLiteralTypesInReceiverPosition
-XXLanguage\:+RangeUntilOperator
@@ -1 +1 @@
-XXLanguage:-ApproximateIntegerLiteralTypesInReceiverPosition
-XXLanguage:-RangeUntilOperator
@@ -1,3 +1,7 @@
fun foo(ttlMillis: Long = 5 * 60 * 1000) {}
const val cacheSize: Long = 4096 * 4
fun test(): Int {
var res = 0
for (x in 100 ..< 1) {
res += x
}
return res
}
@@ -1,13 +1,16 @@
warning: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:-ApproximateIntegerLiteralTypesInReceiverPosition
-XXLanguage:-RangeUntilOperator
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
compiler/testData/cli/jvm/readingConfigFromEnvironment/overridingXx.kt:1:9: warning: parameter 'ttlMillis' is never used
fun foo(ttlMillis: Long = 5 * 60 * 1000) {}
^
OK
compiler/testData/cli/jvm/readingConfigFromEnvironment/overridingXx.kt:3:19: error: this declaration needs opt-in. Its usage must be marked with '@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)'
for (x in 100 ..< 1) {
^
compiler/testData/cli/jvm/readingConfigFromEnvironment/overridingXx.kt:3:19: error: the feature "range until operator" is disabled
for (x in 100 ..< 1) {
^
COMPILATION_ERROR