Introduce -Xprogressive
This commit is contained in:
+5
@@ -16,6 +16,11 @@ where advanced options include:
|
||||
-Xno-check-actual Do not check presence of 'actual' modifier in multi-platform projects
|
||||
-Xno-inline Disable method inlining
|
||||
-Xplugin=<path> Load plugins from the given classpath
|
||||
-Xprogressive Enable compiler progressive mode.
|
||||
In this mode, deprecations and bug fixes for unstable code take effect immediately,
|
||||
instead of going through graceful migration cycle.
|
||||
Code, written in progressive mode is backward compatible; however, code written in
|
||||
non-progressive mode may cause compilation errors in progressive mode.
|
||||
-Xproper-ieee754-comparisons Generate proper IEEE 754 comparisons in all cases if values are statically known to be of primitive numeric types
|
||||
-Xread-deserialized-contracts Enable reading of contracts from metadata
|
||||
-Xreport-output-files Report source to output files mapping
|
||||
|
||||
+5
@@ -58,6 +58,11 @@ where advanced options include:
|
||||
-Xno-check-actual Do not check presence of 'actual' modifier in multi-platform projects
|
||||
-Xno-inline Disable method inlining
|
||||
-Xplugin=<path> Load plugins from the given classpath
|
||||
-Xprogressive Enable compiler progressive mode.
|
||||
In this mode, deprecations and bug fixes for unstable code take effect immediately,
|
||||
instead of going through graceful migration cycle.
|
||||
Code, written in progressive mode is backward compatible; however, code written in
|
||||
non-progressive mode may cause compilation errors in progressive mode.
|
||||
-Xproper-ieee754-comparisons Generate proper IEEE 754 comparisons in all cases if values are statically known to be of primitive numeric types
|
||||
-Xread-deserialized-contracts Enable reading of contracts from metadata
|
||||
-Xreport-output-files Report source to output files mapping
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
interface WithCopy<T> {
|
||||
fun copy(str: T): WithCopy<T>
|
||||
}
|
||||
|
||||
data class Test(val str: String): WithCopy<String>
|
||||
@@ -0,0 +1,6 @@
|
||||
val nonConstArray = longArrayOf(0)
|
||||
|
||||
annotation class Anno(vararg val value: Long)
|
||||
|
||||
@Anno(value = nonConstArray)
|
||||
fun foo1() {}
|
||||
@@ -0,0 +1,5 @@
|
||||
val my: Int = 1
|
||||
get() {
|
||||
field++
|
||||
return field
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
$TESTDATA_DIR$/progressive
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
@@ -0,0 +1,10 @@
|
||||
compiler/testData/cli/jvm/progressive/dataClassOverridingCopy.kt:5:1: warning: function 'copy' generated for the data class has default values for parameters, and conflicts with member of supertype 'WithCopy'
|
||||
data class Test(val str: String): WithCopy<String>
|
||||
^
|
||||
compiler/testData/cli/jvm/progressive/nonConstValueAsVarargInAnnotation.kt:5:15: warning: an annotation argument must be a compile-time constant
|
||||
@Anno(value = nonConstArray)
|
||||
^
|
||||
compiler/testData/cli/jvm/progressive/valReassignmentViaBackingField.kt:3:9: warning: reassignment of read-only property via backing field is deprecated
|
||||
field++
|
||||
^
|
||||
OK
|
||||
@@ -0,0 +1,4 @@
|
||||
$TESTDATA_DIR$/progressive
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xprogressive
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
compiler/testData/cli/jvm/progressive/dataClassOverridingCopy.kt:5:1: error: function 'copy' generated for the data class has default values for parameters, and conflicts with member of supertype 'WithCopy'
|
||||
data class Test(val str: String): WithCopy<String>
|
||||
^
|
||||
compiler/testData/cli/jvm/progressive/nonConstValueAsVarargInAnnotation.kt:5:15: error: an annotation argument must be a compile-time constant
|
||||
@Anno(value = nonConstArray)
|
||||
^
|
||||
compiler/testData/cli/jvm/progressive/valReassignmentViaBackingField.kt:3:9: error: reassignment of read-only property via backing field
|
||||
field++
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
Reference in New Issue
Block a user