Rename unary plus() and minus() to unaryPlus() and unaryMinus()

This commit is contained in:
Yan Zhulanow
2015-10-07 19:25:32 +03:00
parent 1f2b4e20fe
commit ed5c059cea
59 changed files with 210 additions and 88 deletions
@@ -1,9 +1,9 @@
// "Create member function 'plus'" "true"
class A<T>(val n: T) {
fun plus(): A<T> = throw Exception()
operator fun unaryPlus(): A<T> = throw Exception()
}
fun test() {
val a: A<Int> = A(1) + <caret>2
val a: A<Int> = A(1) +<caret> 2
}
@@ -1,7 +1,7 @@
// "Create member function 'plus'" "true"
class A<T>(val n: T) {
fun plus(): A<T> = throw Exception()
operator fun unaryPlus(): A<T> = throw Exception()
operator fun plus(t: T): A<T> {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
@@ -1,4 +1,4 @@
// "Create member function 'getValue', function 'set'" "true"
// "Create member function 'getValue', function 'setValue'" "true"
class F {
}
@@ -1,8 +1,8 @@
// "Create member function 'setValue'" "true"
class F {
fun get(x: X, propertyMetadata: PropertyMetadata): Int = 1
fun getValue(x: X, propertyMetadata: PropertyMetadata): Int = 1
fun set(x: X, propertyMetadata: PropertyMetadata, i: Int) {
fun setValue(x: X, propertyMetadata: PropertyMetadata, i: Int) {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -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() {
@@ -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,4 +1,4 @@
// "Create extension function 'minus'" "true"
// "Create extension function 'unaryMinus'" "true"
fun test() {
val a = <caret>-false
@@ -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,4 +1,4 @@
// "Create member function 'minus'" "true"
// "Create member function 'unaryMinus'" "true"
class A<T>(val n: T)
@@ -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,4 +1,4 @@
// "Create member function 'minus'" "true"
// "Create member function 'unaryMinus'" "true"
class A<T>(val n: T)
@@ -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.
}
}