Lambda --> reference: correct handling of companion references

Reference receivers are named more accurately now #KT-13341 Fixed
This commit is contained in:
Mikhail Glukhikh
2017-03-14 14:37:34 +03:00
parent 2c692de98f
commit 631f58f27f
5 changed files with 49 additions and 6 deletions
@@ -0,0 +1,11 @@
// WITH_RUNTIME
class Foo {
companion object {
fun create(x: String): Foo = Foo()
}
}
fun main(args: Array<String>) {
listOf("a").map {<caret> Foo.create(it) }
}
@@ -0,0 +1,11 @@
// WITH_RUNTIME
class Foo {
companion object {
fun create(x: String): Foo = Foo()
}
}
fun main(args: Array<String>) {
listOf("a").map(Foo.Companion::create)
}