if then to elvis: support calling extension function in class #KT-26343 Fixed

This commit is contained in:
Toshiaki Kameyama
2018-08-24 19:42:55 +09:00
committed by Mikhail Glukhikh
parent b34f32d4f3
commit 8f80851b9a
4 changed files with 21 additions and 1 deletions
@@ -0,0 +1,5 @@
class Foo {
fun Foo.bar(): Int = 1
}
fun Foo.test(foo: Foo?): Int = <caret>if (foo == null) { 0 } else { foo.bar() }
@@ -0,0 +1,5 @@
class Foo {
fun Foo.bar(): Int = 1
}
fun Foo.test(foo: Foo?): Int = foo?.bar() ?: 0