"trait" instead of "trait class"

virtual -> open
 "final" introduced
 "wraps" dropped
This commit is contained in:
Andrey Breslav
2011-09-09 16:16:05 +04:00
parent 704a876537
commit 16dcbd41cb
94 changed files with 537 additions and 532 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import java.lang.Integer
open class C {
virtual fun f(): Any = "C f"
open fun f(): Any = "C f"
}
class D() : C {
@@ -5,7 +5,7 @@ open class Base() {
}
open class Left() : Base() {}
trait class Right : Base {}
trait Right : Base {}
class D() : Left(), Right
@@ -2,7 +2,7 @@ open class Base() {
fun n(n : Int) : Int = n + 1
}
trait class Abstract {}
trait Abstract {}
class Derived1() : Base(), Abstract {}
class Derived2() : Abstract, Base() {}
@@ -1,7 +1,7 @@
// Changed when traits were introduced. May not make sense any more
open class X(val x : Int) {}
trait class Y {
trait Y {
abstract val y : Int
}
@@ -11,7 +11,7 @@ class Point(x : Int, yy : Int) : X(x) , Y {
override val y : Int = yy
}
trait class Abstract {}
trait Abstract {}
class P1(x : Int, yy : Y) : Abstract, X(x), Y by yy {}
class P2(x : Int, yy : Y) : X(x), Abstract, Y by yy {}
@@ -10,7 +10,7 @@ open class Base() {
}
}
trait class Abstract {}
trait Abstract {}
class Derived1() : Base(), Abstract {}
class Derived2() : Abstract, Base() {}
@@ -1,8 +1,8 @@
// Changed when traits were introduced. May not make sense any more
trait class Left {}
trait Left {}
open class Right() {
virtual fun f() = 42
open fun f() = 42
}
class D() : Left, Right() {