Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/compatibilityResolveWithVarargAndOperatorCall.kt
T
Jinseong Jeon 9c2d06cf70 FIR: strengthen resolution success check for augmented array set call
This commit removes some false ambiguities &
fixes compilation of tree-generator module with FIR
2020-12-18 14:24:24 +03:00

18 lines
274 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
fun interface IFoo {
fun foo(i: Int)
}
fun interface IFoo2 : IFoo
object A
operator fun A.get(i: IFoo) = 1
operator fun A.set(i: IFoo, newValue: Int) {}
fun withVararg(vararg xs: Int) = 42
fun test1() {
A[::withVararg] += 1
}