Convert to block body: specify non-nullable type when body expression is platform type and overriden method is non-nullable type
#KT-12222 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
d37b616e1f
commit
0392fe75fc
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
interface Foo {
|
||||
fun foo(): String
|
||||
}
|
||||
|
||||
class Bar : Foo {
|
||||
override fun <caret>foo() = java.lang.String.valueOf(42)
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
interface Foo {
|
||||
fun foo(): String
|
||||
}
|
||||
|
||||
class Bar : Foo {
|
||||
override fun foo(): String {
|
||||
return java.lang.String.valueOf(42)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user