Files
kotlin-fork/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/setWithVararg.kt
T
2017-12-26 18:39:47 +03:00

13 lines
305 B
Kotlin
Vendored

// PROBLEM: none
// ERROR: 'operator' modifier is inapplicable on this function: last parameter should not have a default value or be a vararg
class C {
operator fun set(s: String, vararg value: Int): Boolean = true
}
class D(val c: C) {
fun foo() {
this.c.<caret>set("x", 1, 2)
}
}