Updated test data and stdlib sources.
This commit is contained in:
@@ -58,7 +58,7 @@ fun box() : String {
|
||||
val filtered = x where { it % 2 == 0 }
|
||||
val xx = x select { it * 2 }
|
||||
var res = 0
|
||||
for (val x in xx)
|
||||
for (x in xx)
|
||||
res += x
|
||||
return if (res == 10100) "OK" else "fail"
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
fun foo(x: Int) {}
|
||||
|
||||
fun loop(var times : Int) {
|
||||
while(times > 0) {
|
||||
fun loop(times : Int) {
|
||||
var left = times
|
||||
while(left > 0) {
|
||||
val u : (value : Int) -> Unit = {
|
||||
foo(it)
|
||||
}
|
||||
u(times--)
|
||||
u(left--)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class C(x: Int, val y : Int) {
|
||||
fun initChild(var x: Int) : java.lang.Object {
|
||||
fun initChild(x0: Int) : java.lang.Object {
|
||||
var x = x0
|
||||
return object : java.lang.Object() {
|
||||
override fun toString(): String? {
|
||||
x = x + y
|
||||
|
||||
@@ -2,7 +2,7 @@ import java.util.*
|
||||
|
||||
fun <T> ArrayList<T>.findAll(predicate: (T) -> Boolean): ArrayList<T> {
|
||||
val result = ArrayList<T>()
|
||||
for(val t in this) {
|
||||
for(t in this) {
|
||||
if (predicate(t)) result.add(t)
|
||||
}
|
||||
return result
|
||||
|
||||
@@ -126,7 +126,8 @@ fun t8() : Boolean {
|
||||
return x == 30.toShort()
|
||||
}
|
||||
|
||||
fun t9(var x: Int) : Boolean {
|
||||
fun t9(x0: Int) : Boolean {
|
||||
var x = x0
|
||||
while(x < 100) {
|
||||
x++
|
||||
}
|
||||
@@ -145,7 +146,8 @@ fun t10() : Boolean {
|
||||
return y == 2
|
||||
}
|
||||
|
||||
fun t11(var x: Int) : Int {
|
||||
fun t11(x0: Int) : Int {
|
||||
var x = x0
|
||||
val foo = {
|
||||
x = x + 1
|
||||
val bar = {
|
||||
|
||||
@@ -23,7 +23,7 @@ class Delegated : Tr by Derived() {
|
||||
}
|
||||
|
||||
|
||||
fun checkAssertions(val illegalStateExpected: Boolean) {
|
||||
fun checkAssertions(illegalStateExpected: Boolean) {
|
||||
val check = AssertionChecker(illegalStateExpected)
|
||||
|
||||
// simple call
|
||||
|
||||
Reference in New Issue
Block a user