Add flag to allow using kotlin.Result as a return type

#KT-26659 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2018-09-10 09:25:10 +03:00
parent 864e21dd1b
commit 169599abcc
14 changed files with 57 additions and 2 deletions
+1
View File
@@ -4,6 +4,7 @@ where advanced options include:
-Xfriend-modules-disabled Disable internal declaration export
-Xtyped-arrays Translate primitive arrays to JS typed arrays
-Xallow-kotlin-package Allow compiling code in package 'kotlin' and allow not requiring kotlin.stdlib in module-info
-Xallow-result-return-type Allow compiling code when `kotlin.Result` is used as a return type
-Xcommon-sources=<path> Sources of the common module that need to be compiled together with this module in the multi-platform mode.
Should be a subset of sources passed as free arguments
-Xcoroutines={enable|warn|error}
+1
View File
@@ -62,6 +62,7 @@ where advanced options include:
-Xuse-old-class-files-reading Use old class files reading implementation (may slow down the build and should be used in case of problems with the new implementation)
-Xuse-type-table Use type table in metadata serialization
-Xallow-kotlin-package Allow compiling code in package 'kotlin' and allow not requiring kotlin.stdlib in module-info
-Xallow-result-return-type Allow compiling code when `kotlin.Result` is used as a return type
-Xcommon-sources=<path> Sources of the common module that need to be compiled together with this module in the multi-platform mode.
Should be a subset of sources passed as free arguments
-Xcoroutines={enable|warn|error}
@@ -0,0 +1,4 @@
$TESTDATA_DIR$/flagAllowingResultAsReturnType.kt
-Xallow-result-return-type
-d
$TEMP_DIR$
@@ -0,0 +1 @@
fun foo(): Result<Int> = TODO()
@@ -0,0 +1 @@
OK