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:
@@ -0,0 +1,8 @@
|
||||
data class A(val x: Int, val y: String)
|
||||
|
||||
fun foo(arr: Array<A>) {
|
||||
for ((b, c) in arr) {
|
||||
b : Int
|
||||
c : String
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user