Minor corrections on code review
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
class C {
|
||||
operator fun set(){}
|
||||
}
|
||||
|
||||
class D(val c: C) {
|
||||
fun foo() {
|
||||
this.c.<caret>set()
|
||||
}
|
||||
}
|
||||
+11
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user