Files
kotlin-fork/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.kt
T

15 lines
338 B
Kotlin
Vendored

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