Files
kotlin-fork/compiler/testData/diagnostics/tests/declarationChecks/RedeclarationsInMultiDecl.kt
T
2012-08-17 22:04:35 +04:00

15 lines
323 B
Kotlin

class A {
fun component1() : Int = 1
fun component2() : Int = 2
}
fun a() {
val (<!REDECLARATION!>a<!>, <!REDECLARATION!>a<!>) = A()
val (x, <!REDECLARATION!>y<!>) = A();
val <!REDECLARATION!>b<!> = 1
use(b)
val (<!REDECLARATION!>b<!>, <!REDECLARATION!>y<!>) = A();
}
fun use(a: Any): Any = a