Changed extension in parsing test data (jet -> kt)

This commit is contained in:
Evgeny Gerashchenko
2013-09-17 18:05:44 +04:00
parent 2ee3d22ab9
commit e338cda06d
259 changed files with 519 additions and 400 deletions
@@ -0,0 +1,14 @@
class Pair(x : Int, y : Int) {
class object {
fun copy(from : Pair, x : Int = from.x, y : Int = from.y) = Pair(x, y)
}
}
// One can say:
val p = Point(1, 2)
val p1 = Point.Copy(p, x = 2)
val p2 = Point.Copy(p1, y = -1)
val p3 = Point.Copy(p)
// Such copy(...) methods can be automatically generated by the compiler
// whenever there is a primary constructor