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:
Toshiaki Kameyama
2020-06-18 09:52:57 +09:00
committed by Dmitry Gridin
parent d37b616e1f
commit 0392fe75fc
4 changed files with 33 additions and 1 deletions
@@ -0,0 +1,8 @@
// WITH_RUNTIME
interface Foo {
fun foo(): String
}
class Bar : Foo {
override fun <caret>foo() = java.lang.String.valueOf(42)
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
interface Foo {
fun foo(): String
}
class Bar : Foo {
override fun foo(): String {
return java.lang.String.valueOf(42)
}
}