Implicit Nothing return type is now deprecated
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ fun testCommasAndWhitespaces() {
|
||||
<!UNREACHABLE_CODE!>bar(<!> 1 , todo() , <!UNREACHABLE_CODE!>"" )<!>
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ fun test3() {
|
||||
<!UNREACHABLE_CODE!>bar(<!>11, l@(todo()/*comment*/), <!UNREACHABLE_CODE!>"")<!>
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
|
||||
fun bar(<!UNUSED_PARAMETER!>i<!>: Int, <!UNUSED_PARAMETER!>s<!>: String, <!UNUSED_PARAMETER!>a<!>: Any) {}
|
||||
|
||||
|
||||
+1
-1
@@ -8,4 +8,4 @@ fun testInvokeWithLambda() {
|
||||
todo()<!UNREACHABLE_CODE!>(1){ 42 }<!>
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
+1
-1
@@ -8,4 +8,4 @@ fun test12() {
|
||||
todo()<!UNNECESSARY_SAFE_CALL!>?.<!><!UNREACHABLE_CODE!>bar(1)<!>
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ fun test3() {
|
||||
<!UNREACHABLE_CODE!>bar()<!>
|
||||
}
|
||||
|
||||
fun throwNPE() = null!!
|
||||
fun throwNPE(): Nothing = null!!
|
||||
|
||||
class A {
|
||||
operator fun plus(<!UNUSED_PARAMETER!>a<!>: A): Nothing = throw Exception()
|
||||
|
||||
+1
-1
@@ -37,4 +37,4 @@ fun testArrayPlusAssign(array: Array<Any>) {
|
||||
array[1] <!UNREACHABLE_CODE!>+=<!> todo()
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
+1
-1
@@ -15,4 +15,4 @@ fun testPlusAssign() {
|
||||
}
|
||||
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
Vendored
+1
-1
@@ -35,5 +35,5 @@ fun returnInBinary2(): Boolean {
|
||||
(return true) <!UNREACHABLE_CODE!>|| (return false)<!>
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
fun bar() {}
|
||||
+1
-1
@@ -10,4 +10,4 @@ fun testArgumentInVariableAsFunctionCall(f: (Any) -> Unit) {
|
||||
f<!UNREACHABLE_CODE!>(<!>todo()<!UNREACHABLE_CODE!>)<!>
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
+1
-1
@@ -21,4 +21,4 @@ fun unreachable4(array: Array<Any>) {
|
||||
}
|
||||
|
||||
fun bar(a: Any) {}
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@ fun testIf1(b: Boolean) {
|
||||
bar()
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
fun bar() {}
|
||||
Vendored
+1
-1
@@ -10,4 +10,4 @@ fun testCompound1() {
|
||||
<!UNREACHABLE_CODE!>(<!>todo() <!UNREACHABLE_CODE!>* "")[1]<!>
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
Vendored
+1
-1
@@ -32,5 +32,5 @@ fun testFunctionDefaultArgument() {
|
||||
|
||||
open class Foo(i: Int) {}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
fun bar() {}
|
||||
+1
-1
@@ -17,5 +17,5 @@ fun testDoWhile() {
|
||||
<!UNREACHABLE_CODE!>bar()<!>
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
fun bar() {}
|
||||
+1
-1
@@ -2,4 +2,4 @@ fun testReturn() {
|
||||
<!UNREACHABLE_CODE!>return<!> todo()
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
+1
-1
@@ -12,4 +12,4 @@ fun testPostfixSpecial() {
|
||||
todo()<!UNNECESSARY_NOT_NULL_ASSERTION, UNREACHABLE_CODE!>!!<!>
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
fun todo(): Nothing = throw Exception()
|
||||
Reference in New Issue
Block a user