Component functions are indexed 1-based

This commit is contained in:
Andrey Breslav
2012-08-17 20:16:16 +04:00
parent 87ca056011
commit 409e474748
3 changed files with 7 additions and 7 deletions
@@ -1,13 +1,13 @@
package a
class MyClass {
fun component0(<!UNUSED_PARAMETER!>i<!>: Int) {}
fun component1(<!UNUSED_PARAMETER!>i<!>: Int) {}
}
class MyClass2 {}
<!CONFLICTING_OVERLOADS!>fun MyClass2.component0()<!> = 1.2
<!CONFLICTING_OVERLOADS!>fun MyClass2.component0()<!> = 1.3
<!CONFLICTING_OVERLOADS!>fun MyClass2.component1()<!> = 1.2
<!CONFLICTING_OVERLOADS!>fun MyClass2.component1()<!> = 1.3
fun test(<!UNUSED_PARAMETER!>mc1<!>: MyClass, <!UNUSED_PARAMETER!>mc2<!>: MyClass2) {
val (a, b) = <!COMPONENT_FUNCTION_MISSING, COMPONENT_FUNCTION_MISSING!>mc1<!>
@@ -2,13 +2,13 @@
package a
class MyClass {
fun component0() = 1
fun component1() = "a"
fun component1() = 1
fun component2() = "a"
}
class MyClass2 {}
fun MyClass2.component0() = 1.2
fun MyClass2.component1() = 1.2
fun test(<!UNUSED_PARAMETER!>mc1<!>: MyClass, <!UNUSED_PARAMETER!>mc2<!>: MyClass2) {
val (a, b) = mc1