check Nothing type for all expressions not only for calls and simple names
(but excluding statement expressions)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package c
|
||||
|
||||
fun test1() {
|
||||
<!UNREACHABLE_CODE!>val <!UNUSED_VARIABLE!>r<!>: Nothing = null!!<!>
|
||||
}
|
||||
|
||||
fun test2(a: A) {
|
||||
a + a
|
||||
<!UNREACHABLE_CODE!>bar()<!>
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
null!!
|
||||
<!UNREACHABLE_CODE!>bar()<!>
|
||||
}
|
||||
|
||||
fun throwNPE() = null!!
|
||||
|
||||
class A {
|
||||
fun plus(<!UNUSED_PARAMETER!>a<!>: A): Nothing = throw Exception()
|
||||
}
|
||||
|
||||
fun bar() {}
|
||||
Reference in New Issue
Block a user