Files
kotlin-fork/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.fir.kt
T
Jinseong Jeon f1d8a6e5d1 FIR checker: introduce DECLARATION_SIGNATURE_OR_DEFAULT positioning strategy
and fix CONFLICTING_OVERLOADS to use it
2021-01-21 16:06:09 +03:00

16 lines
298 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 ((<!AMBIGUITY!>x<!>, y) in C()) {
}
}