Refactoring: "simplify assert not null" is now an inspection
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// FIX: "Replace with '?: error(...)'"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class C {
|
||||
fun error(message: String) { }
|
||||
|
||||
fun foo(p: Array<String?>) {
|
||||
val v = p[0] <caret>?: kotlin.error("message")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user