teach 'create from usage' to add 'operator' modifier when necessary
This commit is contained in:
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create member function 'inc'" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun inc(): A<T> {
|
||||
operator fun inc(): A<T> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@
|
||||
class A<T>(val n: T) {
|
||||
fun minus(n: Int): A<T> = throw Exception()
|
||||
|
||||
fun minus(): A<T> {
|
||||
operator fun minus(): A<T> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -4,6 +4,6 @@ fun test() {
|
||||
val a = -false
|
||||
}
|
||||
|
||||
fun Boolean.minus(): Any {
|
||||
operator fun Boolean.minus(): Any {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create member function 'minus'" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun minus(): Any {
|
||||
operator fun minus(): Any {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create member function 'minus'" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun minus(): A<T> {
|
||||
operator fun minus(): A<T> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user