Fix tests: "infix modifier required" and "operator modifier required" errors
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
interface Foo {
|
||||
fun foo(f: (Int) -> Unit)
|
||||
infix fun foo(f: (Int) -> Unit)
|
||||
}
|
||||
fun foo(x: Foo) {
|
||||
x <caret>foo { it * 2 }
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
interface Foo {
|
||||
fun foo(f: (Int) -> Unit)
|
||||
infix fun foo(f: (Int) -> Unit)
|
||||
}
|
||||
fun foo(x: Foo) {
|
||||
x.foo { it * 2 }
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
infix fun String.compareTo(other: String) = 0
|
||||
|
||||
fun foo(x: String) {
|
||||
x!! <caret>compareTo "1"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
infix fun String.compareTo(other: String) = 0
|
||||
|
||||
fun foo(x: String) {
|
||||
x!!.compareTo("1")
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
infix fun String.add(other: String) = ""
|
||||
|
||||
fun foo(x: String) {
|
||||
x plus<caret> ("1" + "2")
|
||||
x add<caret> ("1" + "2")
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
infix fun String.add(other: String) = ""
|
||||
|
||||
fun foo(x: String) {
|
||||
x.plus("1" + "2")
|
||||
x.add("1" + "2")
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
infix fun Int.compareTo(other: Int) = 0
|
||||
|
||||
fun foo(x: Int) {
|
||||
x <caret>compareTo 1
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
infix fun Int.compareTo(other: Int) = 0
|
||||
|
||||
fun foo(x: Int) {
|
||||
x.compareTo(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user