Specify type: do not suggest nullable type if not null is overridden
So #KT-12814 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
50eaca1ac4
commit
817dadc120
@@ -0,0 +1,9 @@
|
||||
// CHOOSE_NULLABLE_TYPE_IF_EXISTS
|
||||
// WITH_RUNTIME
|
||||
interface Base {
|
||||
fun notNullFun(): String
|
||||
}
|
||||
|
||||
class Tesst : Base {
|
||||
override fun notNullFun()<caret> = java.lang.String.valueOf("")
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// CHOOSE_NULLABLE_TYPE_IF_EXISTS
|
||||
// WITH_RUNTIME
|
||||
interface Base {
|
||||
fun notNullFun(): String
|
||||
}
|
||||
|
||||
class Tesst : Base {
|
||||
override fun notNullFun(): String = java.lang.String.valueOf("")
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// CHOOSE_NULLABLE_TYPE_IF_EXISTS
|
||||
// WITH_RUNTIME
|
||||
interface Base {
|
||||
val notNull: String
|
||||
}
|
||||
|
||||
class Tesst : Base {
|
||||
override val notNull<caret> = java.lang.String.valueOf("")
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// CHOOSE_NULLABLE_TYPE_IF_EXISTS
|
||||
// WITH_RUNTIME
|
||||
interface Base {
|
||||
val notNull: String
|
||||
}
|
||||
|
||||
class Tesst : Base {
|
||||
override val notNull: String = java.lang.String.valueOf("")
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// CHOOSE_NULLABLE_TYPE_IF_EXISTS
|
||||
// WITH_RUNTIME
|
||||
interface Base {
|
||||
fun nullableFun(): String?
|
||||
}
|
||||
|
||||
class Tesst : Base {
|
||||
override fun nullableFun()<caret> = java.lang.String.valueOf("")
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// CHOOSE_NULLABLE_TYPE_IF_EXISTS
|
||||
// WITH_RUNTIME
|
||||
interface Base {
|
||||
fun nullableFun(): String?
|
||||
}
|
||||
|
||||
class Tesst : Base {
|
||||
override fun nullableFun(): String? = java.lang.String.valueOf("")
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// CHOOSE_NULLABLE_TYPE_IF_EXISTS
|
||||
// WITH_RUNTIME
|
||||
interface Base {
|
||||
val nullable: String?
|
||||
}
|
||||
|
||||
class Tesst : Base {
|
||||
override val nullable<caret> = java.lang.String.valueOf("")
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// CHOOSE_NULLABLE_TYPE_IF_EXISTS
|
||||
// WITH_RUNTIME
|
||||
interface Base {
|
||||
val nullable: String?
|
||||
}
|
||||
|
||||
class Tesst : Base {
|
||||
override val nullable: String? = java.lang.String.valueOf("")
|
||||
}
|
||||
Reference in New Issue
Block a user