GreatSyntacticShift: Codegen testdata fixed

This commit is contained in:
Andrey Breslav
2011-12-20 22:56:13 +04:00
parent 41fd43b5e5
commit 6aad3b2662
67 changed files with 151 additions and 151 deletions
@@ -1,13 +1,13 @@
class Point(val x : Int, val y : Int)
fun box() : String {
val answer = apply(Point(3, 5), { Point.(scalar : Int) : Point =>
val answer = apply(Point(3, 5), { Point.(scalar : Int) : Point ->
Point(x * scalar, y * scalar)
})
return if (answer.x == 6 && answer.y == 10) "OK" else "FAIL"
}
fun apply(arg:Point, f : fun Point.(scalar : Int) : Point) : Point {
fun apply(arg:Point, f : Point.(scalar : Int) -> Point) : Point {
return arg.f(2)
}