"trait" instead of "trait class"
virtual -> open "final" introduced "wraps" dropped
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user