Create from Usage: Support array access expressions/binary expressions with type mismatch errors
#KT-14501 Fixed
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
// "Create extension function 'A.times'" "true"
|
||||
class A
|
||||
|
||||
operator fun A.times(i: Int) = this
|
||||
|
||||
fun test() {
|
||||
A() * <caret>"1"
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// "Create extension function 'A.times'" "true"
|
||||
class A
|
||||
|
||||
operator fun A.times(i: Int) = this
|
||||
|
||||
fun test() {
|
||||
A() * "1"
|
||||
}
|
||||
|
||||
private infix operator fun A.times(s: String) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create extension function 'A.get'" "true"
|
||||
class A
|
||||
|
||||
fun A.get(i: Int) = this
|
||||
|
||||
fun test() {
|
||||
A()[<caret>"1"]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Create extension function 'A.get'" "true"
|
||||
class A
|
||||
|
||||
fun A.get(i: Int) = this
|
||||
|
||||
fun test() {
|
||||
A()["1"]
|
||||
}
|
||||
|
||||
private operator fun A.get(s: String) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Create extension function 'A.set'" "true"
|
||||
class A
|
||||
|
||||
fun A.set(i: Int, j: Int) {
|
||||
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A()[<caret>"1"] = 2
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Create extension function 'A.set'" "true"
|
||||
class A
|
||||
|
||||
fun A.set(i: Int, j: Int) {
|
||||
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A()["1"] = 2
|
||||
}
|
||||
|
||||
private operator fun A.set(s: String, value: Int) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
Reference in New Issue
Block a user