Fix tests: "infix modifier required" and "operator modifier required" errors
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
fun box(): String {
|
||||
val sum = fun Int.(other: Int) = this + other
|
||||
return if (1 sum 2 == 3) "OK" else "Fail"
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
public object Globals{
|
||||
public fun get(key: String, remove: Boolean = true): String {
|
||||
operator fun get(key: String, remove: Boolean = true): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
fun test() {
|
||||
val a: (@Extension Function2<*, *, *>).(@Extension Function2<*, *, *>)->Unit = {}
|
||||
val b: (@Extension Function2<*, *, *>).(@Extension Function2<*, *, *>)->Unit = {"$this $it"}
|
||||
val c: (@Extension Function2<*, *, *>).(@Extension Function2<*, *, *>)->Unit = {}
|
||||
a.b(c)
|
||||
a b c
|
||||
}
|
||||
|
||||
fun Int.foo(a: Int) = this * a
|
||||
val boo = fun Int.(a: Int): Int = this + a
|
||||
|
||||
fun box(): String {
|
||||
test()
|
||||
1 foo 2
|
||||
3 boo 4
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user