remove support for 'trait' keyword
This commit is contained in:
@@ -2,7 +2,7 @@ open class Base() {
|
||||
fun n(n: Int): Int = n + 1
|
||||
}
|
||||
|
||||
trait Abstract {
|
||||
interface Abstract {
|
||||
}
|
||||
|
||||
class Derived1() : Base(), Abstract {
|
||||
|
||||
@@ -10,7 +10,7 @@ open class Base() {
|
||||
}
|
||||
}
|
||||
|
||||
trait Abstract {
|
||||
interface Abstract {
|
||||
}
|
||||
|
||||
class Derived1() : Base(), Abstract {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Changed when traits were introduced. May not make sense any more
|
||||
|
||||
trait Left {
|
||||
interface Left {
|
||||
}
|
||||
open class Right() {
|
||||
open fun f() = 42
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
trait Tr {
|
||||
interface Tr {
|
||||
fun extra(): String = "_"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
trait BK {
|
||||
interface BK {
|
||||
fun x(): Int = 50
|
||||
}
|
||||
|
||||
trait K : BK {
|
||||
interface K : BK {
|
||||
override fun x(): Int = super.x() * 2
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
open class X(val x: Int) {
|
||||
}
|
||||
trait Y {
|
||||
interface Y {
|
||||
abstract val y: Int
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class Point(x: Int, yy: Int) : X(x), Y {
|
||||
override val y: Int = yy
|
||||
}
|
||||
|
||||
trait Abstract {
|
||||
interface Abstract {
|
||||
}
|
||||
|
||||
class P1(x: Int, yy: Y) : Abstract, X(x), Y by yy {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait M {
|
||||
interface M {
|
||||
var backingB: Int
|
||||
var b: Int
|
||||
get() = backingB
|
||||
|
||||
Reference in New Issue
Block a user