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
@@ -0,0 +1,8 @@
// !ALLOW_RESULT_RETURN_TYPE
fun result(): Result<Int> = TODO()
val resultP: Result<Int> = result()
fun f(r1: Result<Int>?) {
r1 <!RESULT_CLASS_WITH_NULLABLE_OPERATOR!>?:<!> <!UNUSED_EXPRESSION!>0<!>
}
@@ -0,0 +1,5 @@
package
public val resultP: kotlin.Result<kotlin.Int>
public fun f(/*0*/ r1: kotlin.Result<kotlin.Int>?): kotlin.Unit
public fun result(): kotlin.Result<kotlin.Int>