Resolve "componentN" functions for data classes

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.
This commit is contained in:
Alexander Udalov
2012-08-28 20:05:32 +04:00
parent 410922c58d
commit b93db69a24
21 changed files with 285 additions and 4 deletions
@@ -0,0 +1,7 @@
data class A(val x: Int, val y: String)
fun foo(a: A) {
val (b, c) = a
b : Int
c : String
}