Files
kotlin/compiler/testData/diagnostics/tests/declarationChecks/multiDeclarations/ForLoopComponentFunctionAmbiguity.kt
Andrey Breslav 5b77210c95 KT-2632 Check multi-declaraions in for-loops
#KT-2632 Fixed
2012-08-21 19:49:26 +04:00

15 lines
280 B
Kotlin

class A {
<!CONFLICTING_OVERLOADS!>fun component1()<!> = 1
<!CONFLICTING_OVERLOADS!>fun component1()<!> = 1
fun component2() = 1
}
class C {
fun iterator(): Iterator<A> = null!!
}
fun test() {
for ((x, y) in <!COMPONENT_FUNCTION_AMBIGUITY!>C()<!>) {
}
}