Minor corrections on code review

This commit is contained in:
Valentin Kipyatkov
2015-10-22 14:48:22 +03:00
parent 7ee42ab18d
commit c5e13ebc68
8 changed files with 64 additions and 28 deletions
@@ -1,11 +1,11 @@
// INTENTION_TEXT: Replace 'set' call with indexing operator
class C {
operator fun set(s: String, value: Int) {}
operator fun set(s: String, p: Int, value: Int): Boolean = true
}
class D(val c: C) {
fun foo() {
this.c.<caret>set("x", 1)
this.c.<caret>set("x", 2, 1)
}
}
@@ -1,11 +1,11 @@
// INTENTION_TEXT: Replace 'set' call with indexing operator
class C {
operator fun set(s: String, value: Int) {}
operator fun set(s: String, p: Int, value: Int): Boolean = true
}
class D(val c: C) {
fun foo() {
this.c["x"] = 1
this.c["x", 2] = 1
}
}
@@ -0,0 +1,11 @@
// IS_APPLICABLE: false
class C {
operator fun set(){}
}
class D(val c: C) {
fun foo() {
this.c.<caret>set()
}
}
@@ -0,0 +1,11 @@
// IS_APPLICABLE: false
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)
}
}