separate compiler and plugin tests

This commit is contained in:
Dmitry Jemerov
2011-10-20 16:19:02 +02:00
parent a80398098b
commit ec6dec0d37
586 changed files with 69 additions and 42 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