Fix tests: "infix modifier required" and "operator modifier required" errors

This commit is contained in:
Yan Zhulanow
2015-11-26 15:56:56 +03:00
parent a3ff3ffc45
commit 9d1af5a17e
635 changed files with 1283 additions and 1617 deletions
-4
View File
@@ -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
View File
@@ -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"
}
}
-17
View File
@@ -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"
}