mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Reuse existing (but not used) VALUE_PARAMETER_AS_PROPERTY in BindingContext to store mapping from constructor's value parameters to property descriptors. Create a new slice DATA_CLASS_COMPONENT_FUNCTION to store mapping from constructor's value parameters to generated componentN functions.
16 lines
356 B
Kotlin
16 lines
356 B
Kotlin
open data class A(private val x: Int, protected val y: String, public val z: Any)
|
|
|
|
fun foo(a: A) {
|
|
a.<!INVISIBLE_MEMBER!>component1<!>()
|
|
a.<!INVISIBLE_MEMBER!>component2<!>()
|
|
a.component3()
|
|
}
|
|
|
|
class B : A(42, "", "") {
|
|
fun foo() {
|
|
this.<!INVISIBLE_MEMBER!>component1<!>()
|
|
this.component2()
|
|
this.component3()
|
|
}
|
|
}
|