Converting object literal to class allows to choose a name (KT-19254)

This commit is contained in:
Nicolay Mitropolsky
2019-01-08 14:33:32 +03:00
parent a9afee77d7
commit 41b6bcf8c3
8 changed files with 47 additions and 33 deletions
@@ -1,9 +1,9 @@
open class K
fun foo(n: Int) {
val x = <caret>O(n)
val x = K1(n)
}
class O(private val n: Int) : K() {
class K1<caret>(private val n: Int) : K() {
fun bar() = n
}