Fix tests ('infix')

This commit is contained in:
Yan Zhulanow
2015-09-30 21:27:45 +03:00
parent 7e8674c6ee
commit 1b01e7a85a
65 changed files with 146 additions and 132 deletions
@@ -4,9 +4,9 @@
import java.util.*
fun <T> Iterator<T>.foreach(operation: (element: T) -> Unit) : Unit { while(hasNext()) operation(next()) }
infix fun <T> Iterator<T>.foreach(operation: (element: T) -> Unit) : Unit { while(hasNext()) operation(next()) }
fun <T> Iterator<T>.foreach(operation: (index: Int, element: T) -> Unit) : Unit {
infix fun <T> Iterator<T>.foreach(operation: (index: Int, element: T) -> Unit) : Unit {
var k = 0
while(hasNext())
operation(k++, next())
@@ -8,5 +8,5 @@ public fun println(/*0*/ message: kotlin.Long): kotlin.Unit
@kotlin.inline() public fun </*0*/ T> run(/*0*/ body: () -> T): T
public fun </*0*/ T> kotlin.Iterable<T>.foreach(/*0*/ operation: (T) -> kotlin.Unit): kotlin.Unit
public fun </*0*/ T> kotlin.Iterable<T>.foreach(/*0*/ operation: (kotlin.Int, T) -> kotlin.Unit): kotlin.Unit
public fun </*0*/ T> kotlin.Iterator<T>.foreach(/*0*/ operation: (T) -> kotlin.Unit): kotlin.Unit
public fun </*0*/ T> kotlin.Iterator<T>.foreach(/*0*/ operation: (kotlin.Int, T) -> kotlin.Unit): kotlin.Unit
public infix fun </*0*/ T> kotlin.Iterator<T>.foreach(/*0*/ operation: (T) -> kotlin.Unit): kotlin.Unit
public infix fun </*0*/ T> kotlin.Iterator<T>.foreach(/*0*/ operation: (kotlin.Int, T) -> kotlin.Unit): kotlin.Unit
+1 -1
View File
@@ -20,7 +20,7 @@ fun <T> generic_invoker(gen : (String) -> T) : T {
return gen("")
}
fun <T> T.with(f : T.() -> Unit) {
infix fun <T> T.with(f : T.() -> Unit) {
f()
}
+1 -1
View File
@@ -7,4 +7,4 @@ public fun </*0*/ T> generic_invoker(/*0*/ gen: (kotlin.String) -> T): T
public fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
public fun testFunny(): kotlin.Unit
public fun testFunny2(): kotlin.Unit
public fun </*0*/ T> T.with(/*0*/ f: T.() -> kotlin.Unit): kotlin.Unit
public infix fun </*0*/ T> T.with(/*0*/ f: T.() -> kotlin.Unit): kotlin.Unit