if then to elvis: support calling extension function in class #KT-26343 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
b34f32d4f3
commit
8f80851b9a
@@ -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() }
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class Foo {
|
||||
fun Foo.bar(): Int = 1
|
||||
}
|
||||
|
||||
fun Foo.test(foo: Foo?): Int = foo?.bar() ?: 0
|
||||
Reference in New Issue
Block a user