Don't generate component function in lazy resolve for parameter if it has no val/var

This commit is contained in:
Nikolay Krasko
2014-09-08 14:59:09 +04:00
parent caee19cdc7
commit 65d358a066
9 changed files with 68 additions and 5 deletions
@@ -0,0 +1,7 @@
//ALLOW_AST_ACCESS
package test
data class A(foo: String, val bar: Int, other: Long) {
val foo = foo
val other = other
}
@@ -0,0 +1,13 @@
package test
kotlin.data() internal final class A {
/*primary*/ public constructor A(/*0*/ foo: kotlin.String, /*1*/ bar: kotlin.Int, /*2*/ other: kotlin.Long)
internal final val bar: kotlin.Int
internal final fun <get-bar>(): kotlin.Int
internal final val foo: kotlin.String
internal final fun <get-foo>(): kotlin.String
internal final val other: kotlin.Long
internal final fun <get-other>(): kotlin.Long
internal final /*synthesized*/ fun component1(): kotlin.Int
internal final /*synthesized*/ fun copy(/*0*/ foo: kotlin.String, /*1*/ bar: kotlin.Int = ..., /*2*/ other: kotlin.Long): test.A
}