Fix tests ('infix')
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user