Introduce inspection for callables with implicit 'Nothing?' type
Inspection is reported only for vars and open callables So #KT-21023 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
bcbeab00d5
commit
0fffb9fb17
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.inspections.ImplicitNullableNothingTypeInspection
|
||||
@@ -0,0 +1,5 @@
|
||||
// PROBLEM: none
|
||||
|
||||
class My {
|
||||
fun <caret>foo() = null
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
open class My {
|
||||
open fun <caret>foo() = null
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
open class My {
|
||||
open fun foo(): Nothing? = null
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// PROBLEM: none
|
||||
|
||||
fun <caret>foo() = null
|
||||
@@ -0,0 +1,3 @@
|
||||
// PROBLEM: none
|
||||
|
||||
val <caret>x = null
|
||||
@@ -0,0 +1 @@
|
||||
var <caret>x = null
|
||||
@@ -0,0 +1 @@
|
||||
var x: Nothing? = null
|
||||
Reference in New Issue
Block a user