QuickFix: change overloaded operator parameter type or return type

This commit is contained in:
Wojciech Lopata
2013-05-10 00:42:40 +02:00
parent d3492d8e6f
commit 76e648ded3
8 changed files with 96 additions and 1 deletions
@@ -0,0 +1,7 @@
// "Change 'A.not' function return type to 'A'" "true"
trait A {
fun not(): A
fun times(a: A): A
}
fun foo(a: A): A = a * <caret>!(if (true) a else a)
@@ -0,0 +1,8 @@
// "Change 'A.plus' function return type to '() -> Int'" "true"
trait A {
fun plus(a: A): () -> Int
}
fun foo(a: A): () -> Int {
return a + a<caret>
}
@@ -0,0 +1,6 @@
// "Change parameter 'a' type of function 'A.times' to 'String'" "true"
trait A {
fun times(a: String): A
}
fun foo(a: A): A = a * <caret>""
@@ -0,0 +1,7 @@
// "Change 'A.not' function return type to 'A'" "true"
trait A {
fun not(): String
fun times(a: A): A
}
fun foo(a: A): A = a * <caret>!(if (true) a else a)
@@ -0,0 +1,8 @@
// "Change 'A.plus' function return type to '() -> Int'" "true"
trait A {
fun plus(a: A): String
}
fun foo(a: A): () -> Int {
return a + a<caret>
}
@@ -0,0 +1,6 @@
// "Change parameter 'a' type of function 'A.times' to 'String'" "true"
trait A {
fun times(a: A): A
}
fun foo(a: A): A = a * <caret>""