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:
Toshiaki Kameyama
2017-11-01 09:05:40 +03:00
committed by Mikhail Glukhikh
parent bcbeab00d5
commit 0fffb9fb17
12 changed files with 108 additions and 0 deletions
@@ -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