Create from Usage: Add operator modifier to indexing get/set functions
#KT-10185 Fixed
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ class Foo<T> {
|
||||
y["", w] = w
|
||||
}
|
||||
|
||||
private fun set(s: String, w: T, value: T) {
|
||||
private operator fun set(s: String, w: T, value: T) {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,6 +8,6 @@ class Foo<T> {
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> Any.set(s: String, w: ArrayList<T>, value: ArrayList<T>) {
|
||||
operator fun <T> Any.set(s: String, w: ArrayList<T>, value: ArrayList<T>) {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
class A {
|
||||
fun get(s: String): Int = 1
|
||||
|
||||
fun set(s: String, value: Int) {
|
||||
operator fun set(s: String, value: Int) {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user