Rename unary plus() and minus() to unaryPlus() and unaryMinus()
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
// "Create member function 'minus'" "true"
|
||||
// "Create member function 'unaryMinus'" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun minus(n: Int): A<T> = throw Exception()
|
||||
operator fun minus(n: Int): A<T> = throw Exception()
|
||||
}
|
||||
|
||||
fun test() {
|
||||
|
||||
Vendored
+3
-3
@@ -1,9 +1,9 @@
|
||||
// "Create member function 'minus'" "true"
|
||||
// "Create member function 'unaryMinus'" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun minus(n: Int): A<T> = throw Exception()
|
||||
operator fun minus(n: Int): A<T> = throw Exception()
|
||||
|
||||
operator fun minus(): A<T> {
|
||||
operator fun unaryMinus(): A<T> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create extension function 'minus'" "true"
|
||||
// "Create extension function 'unaryMinus'" "true"
|
||||
|
||||
fun test() {
|
||||
val a = <caret>-false
|
||||
|
||||
Vendored
+2
-2
@@ -1,9 +1,9 @@
|
||||
// "Create extension function 'minus'" "true"
|
||||
// "Create extension function 'unaryMinus'" "true"
|
||||
|
||||
fun test() {
|
||||
val a = -false
|
||||
}
|
||||
|
||||
operator fun Boolean.minus(): Any {
|
||||
operator fun Boolean.unaryMinus(): Any {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create member function 'minus'" "true"
|
||||
// "Create member function 'unaryMinus'" "true"
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
// "Create member function 'minus'" "true"
|
||||
// "Create member function 'unaryMinus'" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
operator fun minus(): Any {
|
||||
operator fun unaryMinus(): Any {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create member function 'minus'" "true"
|
||||
// "Create member function 'unaryMinus'" "true"
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// "Create member function 'minus'" "true"
|
||||
// "Create member function 'unaryMinus'" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
operator fun minus(): A<T> {
|
||||
operator fun unaryMinus(): A<T> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user