Add JetMultiDeclarationReference

A reference to component* functions
This commit is contained in:
Pavel V. Talanov
2014-02-17 14:41:36 +04:00
parent 00764d0ae1
commit 6f2ed9a5a9
11 changed files with 133 additions and 0 deletions
@@ -0,0 +1,13 @@
package test
import dependency.*
fun <Int> f(l: List<Int>) {
val (e<caret>l1, el2, el3) = l
}
// MULTIRESOLVE
// REF: (for kotlin.List<T> in dependency).component1()
// REF: (for kotlin.List<T> in dependency).component2()
// REF: (for kotlin.List<T> in dependency).component3()
@@ -0,0 +1,5 @@
package dependency
fun <T> List<T>.component1() = get(0)
fun <T> List<T>.component2() = get(1)
fun <T> List<T>.component3() = get(2)